This documentation is archived and is not being maintained.

IInstanceProvider.ReleaseInstance Method

Called when an InstanceContext object recycles a service object.

Namespace:  System.ServiceModel.Dispatcher
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

void ReleaseInstance(
	InstanceContext instanceContext,
	Object instance
)

Parameters

instanceContext
Type: System.ServiceModel.InstanceContext

The service's instance context.

instance
Type: System.Object

The service object to be recycled.

Use the ReleaseInstance method to perform some custom resource disposal or other recycling customization when a service recycles a service object.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Show: