Forum Discussion

roywill645's avatar
roywill645
Copper Contributor
Sep 21, 2022

Proper use of the IDisposable interface

I know from reading Microsoft documentationsky whatsapp that the "primary" use of the IDisposable interface is to clean up unmanaged resources.

To me, "unmanaged" means things like database connections, sockets, window handles, etc. But, I've seen code where the Dispose() method is implemented to free managed resources, which seems redundant to me, since the garbage collector should take care of that for you.

No RepliesBe the first to reply

Resources