GdPicture.NET.14.API
GdPicture14 Namespace / AnnotationManager Class / Dispose() Method
Example





In This Topic
Dispose() Method
In This Topic
Disposes already used AnnotationManager object completely. All related resources used by this object are released.
Syntax
'Declaration
 
Public Sub Dispose() 
public void Dispose()
public procedure Dispose(); 
public function Dispose();
public: void Dispose(); 
public:
void Dispose(); 
Remarks
You can also reuse the AnnotationManager object simply by using the AnnotationManager.Close method and subsequently initialize it from another source.
Example
How to create and dispose of the AnnotationManager object.
Dim annotationManager As AnnotationManager = New AnnotationManager()
If annotationManager.InitFromFile("test.tif") = GdPictureStatus.OK Then
    MessageBox.Show("The number of pages: " + annotationManager.PageCount, "AnnotationManager.Dispose")
Else
    MessageBox.Show("The AnnotationManager can't be properly initialized. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.Dispose")
End If
annotationManager.Dispose()
AnnotationManager annotationManager = new AnnotationManager();
if (annotationManager.InitFromFile("test.tif") == GdPictureStatus.OK)
{
    MessageBox.Show("The number of pages: " + annotationManager.PageCount, "AnnotationManager.Dispose");
}
else
    MessageBox.Show("The AnnotationManager can't be properly initialized. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.Dispose");
annotationManager.Dispose();
See Also