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 6204833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:09:57+00:00 2026-05-24T05:09:57+00:00

I understand that each process has its own address space allocated by the Operating

  • 0

I understand that each process has its own address space allocated by the Operating System. So when the program terminates, that whole address space is marked as invalid (or is free to be reused again). Now if the said process is leaking memory, will it make any difference after the program is terminated ?

That is to say, if my program is terminated after sometime or is run at short intervals with continuous start-finish mechanism, will leaking memory make much difference ? (i am assuming the leak is not large enough to cause thrashing on an average system)

I know leaks are bad – but my question stems from the point that suppose an object is being used in the final routine of the code – will NOT FIXING the leak make any difference as the process is going to be terminated after this anyway ?

Thanks in Advance 🙂

  • 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-24T05:09:58+00:00Added an answer on May 24, 2026 at 5:09 am

    This is a very OS-dependent question.

    On a modern multiprocessing OS that uses Virtual Memory (eg: Windows 7, Linux), it is true that all (OK, not all, but let’s not be nit-picky here) resources are process-specific and will be released back to the system when the process terminates.

    So does it matter if your program “leaks memory”? Well, that depends on how it does it.

    If you allocate a bunch of resources at startup, no it does not really matter if you manually free them at shutdown or just let the OS do it. I’ll admit to being a lazy programmer who likes to let the OS handle such things.

    However, if you allocate resources in a loop or on demand at runtime for some reason, and don’t bother to manage them in some way, then theoretically if you let your program run long enough it will continually “leak” resources until the point comes that there aren’t any more left to allocate. This is a Bad Thing. Don’t do it.

    Now there are a lot of platforms that do not behave this way. If you ever end up doing embedded work, you are quite likely to end up on a platform where you have to manage all of your own resources (manually free memory, close file handles, etc.)

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

Sidebar

Related Questions

I understand that a user can own a process and each process has an
Each technology is powerful with libraries and frameworks, written for it. I understand, that
I have two running processes in Windows, and each process has a pipe to
I am wondering, that each char in Unicode has a code point; what's the
I'm making a program in wxWidgets that has similar functionality to, say, MS Paint,
I'm working on a build system that has bad practices piled on other bad
I have a process that has to be ran against certain things and it
I understand that some countries have laws regarding website accessibility. In general, what are
I understand that there are several ways to blend XNA and WPF within the
I understand that they are both supposed to be small, but what are the

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.