SPFeatureReceiverProperties.Dispose Method

Releases unmanaged resources that are used by this object.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Sub Dispose
'Usage
Dim instance As SPFeatureReceiverProperties

instance.Dispose()
public void Dispose()

Implements

IDisposable.Dispose()

Remarks

It is not necessary to call the Dispose method in the event-handling methods of subclasses of the SPFeatureReceiver class. These event-handlers pass an SPFeatureReceiverProperties object in a parameter, but the SPFeature object that raises the events and creates the SPFeatureReceiverProperties object automatically disposes of unmanaged resources when the event-handler returns.

However, if you should for some reason create your own SPFeatureReceiverProperties object, then you would be responsible for releasing resources by calling the Dispose method when you are finished with the object.

Call Dispose when you are finished using the SPFeatureReceiverProperties class. The Dispose method leaves SPFeatureReceiverProperties in an unusable state. After calling Dispose, you must release all references to the SPFeatureReceiverProperties class so the garbage collector can reclaim the memory that SPFeatureReceiverProperties was occupying.

See Also

Reference

SPFeatureReceiverProperties Class

SPFeatureReceiverProperties Members

Microsoft.SharePoint Namespace