# Friday, 05 January 2007

Heh, you think it's not possible to leak memory from a managed application? Of course it is. For one thing, if you leak a thread, you will leak that whole thread's stack. Oh yes, there's more to memory than heaps. And there's more than one heap, too. You could mess up your interop and leak from the native heap, or you could even leak from the managed heap, generally as a result of an error somewhere other than the leaking code ... like a misbehaving finalizer that prevents some other finalizer from running, which prevents some other memory from being freed since it can't be freed till it's been finalized. Eeeeeww.

If none of this ever occurred to you before, and you're not scared to read more about it, check James Kovac's article in the January 2007 MSDN Magazine. He tells you how to notice leaks, track them down, and do something about them. (BTW, he's a Canadian MVP.) You'll also learn what a garbage collector does instead of buying a Porsche when it suffers a midlife crisis.


Friday, 05 January 2007 13:27:47 (Eastern Standard Time, UTC-05:00)  #    Comments [0]