In .NET perspective:What is a memory leak?How can you determine whether your application leaks? What are the effects?How can you prevent a memory leak?If your application has memory leak, does it go away when the process exits or is killed? Or do memory leaks in your application affect other processes on the system even after process completion?And what about unmanaged code accessed via COM Interop and/or P/Invoke?
Oh you like book do you? I've seen the author pop up on stackoverflow from time to time.
Some .NET objects can also root themselves and becomeuncollectable.Anything that's IDisposable should be disposed because of this.
kyoryu : How does an object root itself?
Andrei: I think a running Thread is perhaps the best example of an object rooting itself.An object that puts a reference to itself in a static non-public location (such as subscribing to a static event, or implementing a singleton by static field initialization) may as well have rooted itself, since there's no obvious way to... um... "uproot" it from its mooring.
Jeffry this is an unconvential way to describe whats happening and I like it!