Aracılığıyla paylaş


Release Method

Releases a form, form set, or toolbar from memory.

The Release method is particularly useful when a Form or FormSet object is created with the DO FORM command, and no variable exists to reference the form or form set. For more information, see DO FORM Command.

Object.Release

Remarks

Applies To: Form | FormSet | _SCREEN | ToolBar

You can use the forms collection of the _SCREEN object to find the form or form set and call its Release method.

When adding objects to collections, Visual FoxPro increases the reference count for that object. According to usual Visual FoxPro object behavior, you can release an object only when its reference count is 0. Therefore, you should make sure that the reference to the object in the collection is released when releasing the object; otherwise, the Visual FoxPro does not remove the object entirely from memory.

Note

When you have an object reference to a form in a collection, and you call the form's Release method, the object is removed from the collection without having to release or remove the form from the collection first.

See Also

Other Resources

Methods (Visual FoxPro)