Example





In This Topic

Dispose() Method

In This Topic
Disposes of the GdPictureOCR object completely. All related resources used by this object are released. All used OCR results within the current GdPictureOCR object are released too.
Syntax
'Declaration

 

Public Sub Dispose() 
public void Dispose()
public procedure Dispose(); 
public function Dispose();
public: void Dispose(); 
public:

void Dispose(); 
Remarks
Please note, that by disposing of the current GdPictureOCR object you also release all linked OCR results.
Example
How to create and dispose of a GdPictureOCR object.
'The elementary use of the Dispose() method.

Dim gdpictureOCR As New GdPictureOCR()

'You can do your stuff with gdpictureOCR here.

gdpictureOCR.Dispose()

 

'The very good practice is to use the keyword "using".

Using gdpictureOCR As New GdPictureOCR()

'You can do your stuff with gdpictureOCR 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.

GdPictureOCR gdpictureOCR = new GdPictureOCR();

//You can do your stuff with gdpictureOCR here.

gdpictureOCR.Dispose();

 

 

//The very good practice is to use the keyword "using".

using (GdPictureOCR gdpictureOCR = new GdPictureOCR())

{

    //You can do your stuff with gdpictureOCR here.

    //You do not need to call the Dispose() method, it is called automatically inside the "using" statement.

}
See Also