Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 937011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:24:21+00:00 2026-05-15T21:24:21+00:00

My program (a text-mode web browser) is dynamically allocating memory. I do free unneeded

  • 0

My program (a text-mode web browser) is dynamically allocating memory.

I do free unneeded blocks during runtime, of course. And I do free everything before normal termination – so that memory leak checkers won’t give me false positives (and to be flexible should major refactorings ever become needed).

Now, what I do not do is freeing memory before abnormal termination. (Currently, my program terminates on signals and after failed mallocs/reallocs.)

My question is: Do you consider this bad style? Should I free on abnormal termination?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:24:21+00:00Added an answer on May 15, 2026 at 9:24 pm

    No. I think it’s perfectly acceptable to simply throw up your hands and let the OS reclaim the memory after the program terminates. I think if this is truly an abnormal situation and the intention is to have the program terminate, then a well-behaved program should simply clean up any disk resources/locks, and exit as quickly as possible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 492k
  • Answers 492k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I have multiple EC2 servers running commercial production websites, and… May 16, 2026 at 10:19 am
  • Editorial Team
    Editorial Team added an answer I have a maven project A that use hibernate-annotations 3.4.0.GA… May 16, 2026 at 10:19 am
  • Editorial Team
    Editorial Team added an answer Like others have mentioned, the only way is to QueryInterface… May 16, 2026 at 10:19 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a text file in Program Files. I cannot write it from a
I'm making a notepad-like program. To get the text from a file I read
I am writing a program that needs to take text input, and modify individual
I'm considering making a text-based RPG-type program in PHP as both a holiday project
We are currently processing big word documents in c# program. During processing i am
I want my program to be able to launch any Windows game, and while
I've created this program that can encrypt a found file and then it can
I am trying to make my first program in vb.net 2010, and I have
response.setContentType(text/html); PrintWriter out = response.getWriter(); Connection conn = null; String url = jdbc:mysql://localhost:3306/; String
I want to use the Java API in my NetLogo program. For that, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.