### 2.9.4 Destroying a Widget

To destroy a widget, use

`void EZ_DestroyWidget(EZ_Widget *widget)`

This function destroys a widget. All data allocated for widget is freed after calling this function. During the destruction process, it calls all the destroy callbacks registered to widget.

A destroyed widget should never be referenced again.

HTML Documentation Maintainance:`Arturo Espinosa <arturo@nuclecu.unam.mx>`