MessageBuffer.IDisposable.Dispose Method ()


Releases the unmanaged resources used by the MessageBuffer and optionally releases the managed resources. This method cannot be inherited.

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

void IDisposable.Dispose()

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


Always call this method before you release your last reference to the MessageBuffer. Otherwise, the resources it is using are not freed until the garbage collector calls the MessageBuffer object's Finalize method.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top