RemoteObject.Dispose Method
This API supports the Visual Studio Tools for Applications infrastructure and is not intended to be used directly from your code.
Releases all resources used by the RemoteObject.
Namespace: Microsoft.VisualStudio.Tools.Applications
Assembly: Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0 (in Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0.dll)
Syntax
'Declaration
Public Sub Dispose
'Usage
Dim instance As RemoteObject
instance.Dispose()
public void Dispose()
public:
virtual void Dispose() sealed
public final function Dispose()
Implements
Remarks
Reasons for using one of the Dispose methods include releasing contracts, removing proxies from the cache, and so on.
Call Dispose when you have finished using the RemoteObject. The Dispose method leaves the RemoteObject in an unusable state. After calling Dispose, you must release all references to the RemoteObject so the garbage collector can reclaim the memory that the RemoteObject 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 RemoteObject. Otherwise, the resources it is using will not be freed until the garbage collector calls the Finalize method on the RemoteObject.