Bunkai.Satori
Bunkai.Satori

Reputation: 4758

Memory Leaks During Debug Sessions - Possible Threat?

While programming, I compile and test application maybe hundred of times a day. Moreover, I use to put my computer into sleep mode overnight, so memory does not get cleaned by the fresh system start.

Often, I postpone solving memory leaks for later, say a particular day in a week. My question is, whether memory leaks that occur during debugging sessions can accumulate and affect the stability of whole system. Alternatively, is all the memory automatically released by the operating system, after the debugged application exit?

I develop in C++ under Visual Studio 2010, Windows 7 x64.

Upvotes: 1

Views: 124

Answers (2)

xtofl
xtofl

Reputation: 41509

If you develop for Windows, the memory of one process is shielded from that of another process. Inactive processes will have their (non-commited) RAM pages flushed to disk, so that physical memory stays available for active processes. So stability will not be affected (apart from a lonely bug in the operating system).

Less in control are other resource leaks, e.g. the number of open handles, coming forth of leaked objects holding them. These may very well cause system instability.

Upvotes: 3

Hans Passant
Hans Passant

Reputation: 941515

No, the operating system cleans up when the process terminates.

Upvotes: 4

Related Questions