Share via


LanguagePreferences.Dispose Method

Definition

Cleans up any allocated resources before the object is destroyed.

public:
 virtual void Dispose();
public:
 virtual void Dispose();
 virtual void Dispose();
public virtual void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Public Overridable Sub Dispose ()

Implements

Remarks

The base method disconnects from listening to text manager events.

Call <xref:Namespace.Class.Dispose%2A> when you are finished using the LanguagePreferences. The <xref:Namespace.Class.Dispose%2A> method leaves the LanguagePreferences in an unusable state. After calling <xref:Namespace.Class.Dispose%2A>, you must release all references to the LanguagePreferences so the garbage collector can reclaim the memory that the LanguagePreferences was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

Note

Always call <xref:Namespace.Class.Dispose%2A> before you release your last reference to the LanguagePreferences. Otherwise, the resources it is using will not be freed until the garbage collector calls the LanguagePreferences object's Finalize method.

Applies to