MidiPacket.Dispose Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Dispose() |
Releases the resources used by the MidiPacket object. |
Dispose(Boolean) |
Releases the resources used by the MidiPacket object. |
Dispose()
Releases the resources used by the MidiPacket object.
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Implements
Remarks
The Dispose method releases the resources used by the MidiPacket class.
Calling the Dispose method when the application is finished using the MidiPacket ensures that all external resources used by this managed object are released as soon as possible. Once developers have invoked the Dispose method, the object is no longer useful and developers should no longer make any calls to it. For more information on releasing resources see ``Cleaning up Unmananaged Resources'' at https://msdn.microsoft.com/en-us/library/498928w2.aspx
Applies to
Dispose(Boolean)
Releases the resources used by the MidiPacket object.
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Parameters
- disposing
- Boolean
If set to true
, the method is invoked directly and will dispose manage and unmanaged resources; If set to false
the method is being called by the garbage collector finalizer and should only release unmanaged resources.
Remarks
This Dispose method releases the resources used by the MidiPacket class.
This method is called by both the Dispose() method and the object finalizer (Finalize). When invoked by the Dispose method, the parameter disposing disposing
is set to true
and any managed object references that this object holds are also disposed or released; when invoked by the object finalizer, on the finalizer thread the value is set to false
.
Calling the Dispose method when the application is finished using the MidiPacket ensures that all external resources used by this managed object are released as soon as possible. Once developers have invoked the Dispose method, the object is no longer useful and developers should no longer make any calls to it.
For more information on how to override this method and on the Dispose/IDisposable pattern, read the ``Implementing a Dispose Method'' document at https://msdn.microsoft.com/en-us/library/fs2xkftw.aspx