System.Windows.Forms.Design.Behavior.BehaviorService.Dispose Method

Releases all resources used by the System.Windows.Forms.Design.Behavior.BehaviorService.

Syntax

public void Dispose ()

Remarks

Call BehaviorService.Dispose when you are finished using the System.Windows.Forms.Design.Behavior.BehaviorService. The BehaviorService.Dispose method leaves the System.Windows.Forms.Design.Behavior.BehaviorService in an unusable state. After calling BehaviorService.Dispose, you must release all references to the System.Windows.Forms.Design.Behavior.BehaviorService so the garbage collector can reclaim the memory that the System.Windows.Forms.Design.Behavior.BehaviorService was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

Note:

Always call BehaviorService.Dispose before you release your last reference to the System.Windows.Forms.Design.Behavior.BehaviorService. Otherwise, the resources it is using will not be freed until the garbage collector calls the System.Windows.Forms.Design.Behavior.BehaviorService object's Finalize method.

Requirements

Namespace: System.Windows.Forms.Design.Behavior
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 2.0.0.0