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

3
2



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:

Slides:

Nguồn:https://wijstaanvooronzegrondrechten.org/

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

3 COMMENTS

  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!

LEAVE A REPLY

Please enter your comment!
Please enter your name here