May 20, 2024, 11:04:47 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Memory Leaks

Started by Bruce Peaslee, December 28, 2005, 10:08:03 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Bruce Peaslee

I understand that memory leaks are undesirable, but I don't know all the ways they can be generated. Is there some way to detect them programmatically?
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

Parker

You can generate them by allocating memory with NEW or a windows function like GlobalAlloc and then forgetting to free it, or assigning its pointer somewhere else. There's not an easy way to detect them unless you build your own garbage collecting system and allocate all variables through it.