<t>The point of Dispose is to free unmanaged resources. It needs to be done at some point, otherwise they will never be cleaned up. The garbage collector doesn't know how to call DeleteHandle() on a variable of type IntPtr, it doesn't know whether or not it needs to call DeleteHandle().<br/>
<br/>
Note: What is an unmanaged resource? If you found it in the Microsoft .NET Framework: it's managed. If you went poking around MSDN yourself, it's unmanaged. Anything you've used P/Invoke calls to get outside of the nice comfy world of everything available to you in the .NET Framework is unmanaged – and you're now responsible for cleaning it up.<br/>
<br/>
The object that you've created needs to expose some method, that the outside world can call, in order to clean up unmanaged resources. The method can be named whatever you like:<br/>
<br/>
public void Cleanup()<br/>
<br/>
```<br/>
<br/>
or<br/>
<br/>
```<br/>
public void Shutdown()<br/>
<br/>
```<br/>
<br/>
But instead there is a standardized name for this method:<br/>
<br/>
```<br/>
public void Dispose()<br/>
<br/>
```<br/>
<br/>
There was even an interface created, `IDisposable`, that has just that one method:<br/>
<br/>
```<br/>
public interface IDisposable<br/>
{<br/>
void Dispose();<br/>
}<br/>
<br/>
```<br/>
<br/>
So you make your object expose the `IDisposable` interface, and that way you promise that you've written that single method to clean up your unmanaged resources:<br/>
<br/>
```<br/>
public void Dispose()<br/>
{<br/>
Win32.DestroyHandle(this.CursorFileBitmapIconServiceHandle);<br/>
}<br/>
<br/>
```<br/>
<br/>
And you're done.<br/>
<br/>
Except you can do better<br/>
<br/>
What if your object has allocated a 250MB **[System.Drawing.Bitmap](http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.aspx)** (i.e. the .NET managed Bitmap class) as some sort of frame buffer? Sure, this is a managed .NET object, and the garbage collector will free it. But do you really want to leave 250MB of memory just sitting there – waiting for the garbage collector to *eventually* come along and free it? What if there's an [open database connection](http://msdn.microsoft.com/en-us/library/system.data.common.dbconnection.aspx)<br/>
<br/>
*(Réponse tronquée)*</t>