Dijeli putem


Dispose Method

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Use this method to release resources by the Profile object.

Namespace:  Microsoft.CommerceServer.Runtime.Profiles
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Sub Dispose
'Usage
Dim instance As Profile

instance.Dispose()
public void Dispose()
public:
virtual void Dispose() sealed
public final function Dispose()

Implements

IDisposable..::.Dispose()()()

Remarks

Releases all resources used by the current module.

Calling this method allows the resources used by the application context to be reallocated for other purposes.

Call Dispose when you are finished using the Profile. The Dispose method leaves the Profile in an unusable state. After calling Dispose, you must release all references to the Profile so the garbage collector can reclaim the memory that the Profile 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 Profile. Otherwise, the resources it is using will not be freed until the garbage collector calls the Profile object's Finalize method.

Permissions

See Also

Reference

Profile Class

Profile Members

Microsoft.CommerceServer.Runtime.Profiles Namespace