Share via


Generator.Dispose Method

Releases all resources used by the Generator class.

Namespace:  Microsoft.Data.Schema.DataGenerator
Assembly:  Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)

Syntax

'Declaration
Public Sub Dispose
'Usage
Dim instance As Generator

instance.Dispose()
public void Dispose()
public:
virtual void Dispose() sealed
public final function Dispose()
abstract Dispose : unit -> unit 
override Dispose : unit -> unit 

Implements

IDisposable.Dispose()

Remarks

Call Dispose() when you are finished using the Generator. The Dispose() method leaves the Generator in an unusable state. After you call Dispose(), you must release all references to the Generator so that the garbage collector can reclaim the memory that the Generator was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

Note

Always call Dispose() before you release your last reference to the Generator. Otherwise, the resources Dispose() is using will not be freed until the garbage collector calls the Generator Finalize method of the object.

.NET Framework Security

See Also

Reference

Generator Class

Generator Members

Dispose Overload

Microsoft.Data.Schema.DataGenerator Namespace