PtDestroyWidget

PtDestroyWidget — deletes a widget.

Syntax

PtDestroyWidget (widget)

		

Arguments

widget

The widget to destroy.

Returns

t if successful, otherwise an error message.

Description

This function deletes the widget. It will remove all callbacks attached to it as well. If the widget class has a defined destructor, then it is called. The class instance object is marked as a destroyed instance type and the memory used for the widget is recovered the next time the garbage collector runs.

Example

Gamma> PtInit(nil);
t
Gamma> win = new(PtWindow);
window instance definition
Gamma> PtDestroyWidget(win);
t
		

See Also

PtRealizeWidget, PtUnrealizeWidget

and in Photon documentation: PtDestroyWidget.