. NET GC – Understanding IDisposable, managed, and unmanaged memory


In this video I will do my best to help you fully understand the IDisposable interface, the basic dispose pattern, finalizers, and how your implementations of Dispose interact with the GC and garbage collection when dealing with managed and unmanaged memory.

Source code:



Xem Thêm Bài Viết Khác:https://wijstaanvooronzegrondrechten.org/cong-nghe


  1. Thank you for a very good and clear explanation of the IDisposable interface. I have one question though. At 30:46 you are mentioning the call to image.Dispose() as a managed resource. Isn't image here an unmanaged resource that you are disposing? I know you are correct in what you are saying, since the Microsoft documentation is saying the same thing, but I really can't get why it is called 'managed'. I'm very new to C# (coming from Java) so maybe it is obvious to everyone else? 🙂

  2. Things to consider for your next presentation: Show your presentation in full screen. Show your code in full screen without windows on all sizes reducing the relevant space to a minimum. And don't use a semi transparent console which just distracts again from the relevant content. That said, well explained and very informative!


Please enter your comment!
Please enter your name here