Name
moai.FreeObject -- delete a detached MOAI object
Synopsis
moai.FreeObject(id$)
Function
This function can be used to delete a detached MOAI object that has been created either by moai.CreateObject() or moai.CreateApp(). The MOAI object that you specify here must not be attached to an application, group, or menu object any longer because attached MOAI objects are freed with their parent so make sure you only use this function with MOAI objects that have been detached from their parent and are no longer bound to any parent object.

To detach MOAI objects from their respective parents, you have to use one of the following methods: Application.RemoveWindow, Menubar.Remove, Menu.Remove or Group.Remove.

When RapaGUI exits, it will automatically free all detached MOAI objects so unless your program constantly adds and removes MOAI objects at runtime, you will normally not have to call this function at all.

Inputs
id$
identifier of MOAI object to free

Show TOC