Skip to content

The support provided by .NET for reliably release the unmanaged resources, like manually allocated memory.

Notifications You must be signed in to change notification settings

CSharp-Pills-15mg/Disposable-Pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disposable Pattern

Pill Category

Patterns, Frameworks (.NET Framework, .NET)

Description

.NET provides a mechanism (Garbage Collector ) that keeps track of the memory allocated by .NET objects and automatically releases that memory when the objects are not referenced anymore.

But it cannot detect when memory is manually allocated, for example by some native code. That memory must be manually deallocated.

.NET offers support for these situation by providing the IDisposable interface, which, together with the finalizer method, can be used to reliably release the unmanaged resources (like manually allocated memory) when they are not needed anymore.

Donations

If you like my work and want to support me, you can buy me a coffee:

ko-fi

About

The support provided by .NET for reliably release the unmanaged resources, like manually allocated memory.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

Languages