Example





In This Topic

Dispose() Method

In This Topic
Disposes of the GdPictureSegmenter object completely. All related resources used by this object are released. All used segmentation results within the current GdPictureSegmenter 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 GdPictureSegmenter object you also release all linked segmentation results.
Example
How to create and dispose of a GdPictureSegmenter object.
'The elementary use of the Dispose() method.
Dim gdpictureSegmenter As New GdPictureSegmenter()
'You can do your stuff with gdpictureSegmenter here.
gdpictureSegmenter.Dispose()
 
'The very good practice is to use the keyword "using".
Using gdpictureSegmenter As New GdPictureSegmenter()
'You can do your stuff with gdpictureSegmenter 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.
GdPictureSegmenter gdpictureSegmenter = new GdPictureSegmenter();
//You can do your stuff with gdpictureSegmenter here.
gdpictureSegmenter.Dispose();
 
 
//The very good practice is to use the keyword "using".
using (GdPictureSegmenter gdpictureSegmenter = new GdPictureSegmenter())
{
    //You can do your stuff with gdpictureSegmenter here.
    //You do not need to call the Dispose() method, it is called automatically inside the "using" statement.
}
See Also