'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.
}