Re: Memory leaks
- From: Tor Lillqvist <tml iki fi>
- To: John Emmas <johne53 tiscali co uk>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: Memory leaks
- Date: Wed, 9 Feb 2011 13:13:40 +0200
Each time you call _CrtDumpMemoryLeaks() it dumps all the memory that's been allocated but not yet released.
So it doesn't take into consideration at all whether the memory in
question is / can be used or not, i.e. whether there is any pointer to
it in local variables, etc. All memory that has not been released is a
"leak"?
Does it make sense for a library to spend significant amount of time
(potentially paging in pages that have otherwise been stale for ages)
when the using process is about to exit, just to "free" memory, that
will be truly freed by the OS anyway as soon as the process finally
gets to actually exiting, which it would have already, hadn't the
library been spendign time trawling its data structures in order to
"free" memory?
ÂThis creates a problem, inasmuch as if memory is leaking according to your definition Tor, it's almost
impossible to
find the leak among all the other leaks that wouldn't be classed as leaks by your definition.
With the right tool there is no problem at all in finding such "true"
leaks. On Windows, I guess it could be Purify?
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]