GdPicture.NET Reference Guide
Dispose() Method
Example 





GdPicture14 Namespace > GdPictureImaging Class : Dispose() Method
Disposes already used GdPictureImaging object completely. All related resources used by this object are released.

Be aware, that all unreleased images (GdPictureImage objects) allocated by this object will remain available in the memory until they are destroyed by the ReleaseGdPictureImage method of any other GdPictureImaging object. You can also use the GdPictureDocumentUtilities.ReleaseAllGdPictureImages method to destroy all allocated image resources from the memory in one step.

Syntax
'Declaration
 
Public Sub Dispose() 
public void Dispose()
public procedure Dispose(); 
public function Dispose();
public: void Dispose(); 
public:
void Dispose(); 
Remarks
Please note that you need to release all allocated image resources after being used.
Example
How to create and dispose of a GdPictureImaging object.
'The elementary use of the Dispose() method.
Dim oImage As New GdPictureImaging()
'You can do your stuff with oImage here.
oImage.Dispose()
 
'The very good practise is to use the keyword "using".
Using oImage As New GdPictureImaging()
'You can do your stuff with oImage here.
'You do not need to call the Dispose() method, it is called automatically inside the "using" statement.
End Using
//The elementary use of the Dispose() method.
GdPictureImaging oImage = new GdPictureImaging();
//You can do your stuff with oGdPicturePDF here.
oImage.Dispose();
 
 
//The very good practise is to use the keyword "using".
using (GdPictureImaging oImage = new GdPictureImaging())
{
    //You can do your stuff with oImage here.
    //You do not need to call the Dispose() method, it is called automatically inside the "using" statement.
}
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
GdPictureImaging Constructor
ReleaseGdPictureImage Method