Safer handling of Booleans.
[AROS.git] / workbench / libs / muimaster / mui_disposeobject.c
blob2c95a349b85a2a21635476350dd54d072e8bca82
1 /*
2 Copyright © 2002-2007, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/muimaster.h>
7 #include <proto/intuition.h>
9 #include "muimaster_intern.h"
11 /*****************************************************************************
13 NAME */
14 AROS_LH1(VOID, MUI_DisposeObject,
16 /* SYNOPSIS */
17 AROS_LHA(Object *, obj, A0),
19 /* LOCATION */
20 struct Library *, MUIMasterBase, 6, MUIMaster)
22 /* FUNCTION
23 Deletes MUI object and its child objects.
25 INPUTS
26 obj - pointer to MUI object created with MUI_NewObject. May be NULL,
27 in which case this function has no effect.
29 RESULT
31 NOTES
33 EXAMPLE
35 BUGS
37 SEE ALSO
39 INTERNALS
40 MUI will call DisposeObject(), then call CloseLibrary() on
41 OCLASS(obj)->h_Data if cl_ID!=NULL && h_Data!=NULL.
43 *****************************************************************************/
45 AROS_LIBFUNC_INIT
47 if (obj == NULL)
48 return;
50 Class *cl = OCLASS(obj);
52 DisposeObject(obj);
54 MUI_FreeClass(cl);
56 AROS_LIBFUNC_EXIT
58 } /* MUIA_DisposeObject */