Minor fixes to comments.
[AROS.git] / rom / intuition / disposeobject.c
blob3d3497adcfab60dd8d8dc1357332e8d456d07291
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include <intuition/classes.h>
8 #include <proto/alib.h>
9 #include "intuition_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <intuition/classusr.h>
15 #include <proto/intuition.h>
17 AROS_LH1(void, DisposeObject,
19 /* SYNOPSIS */
20 AROS_LHA(APTR, object, A0),
22 /* LOCATION */
23 struct IntuitionBase *, IntuitionBase, 107, Intuition)
25 /* FUNCTION
26 Deletes a BOOPSI object. All memory associated with the object
27 is freed. The object must have been created with NewObject().
28 Some object contain other object which might be freed as well
29 when this function is used on the "parent" while others might
30 also contain children but won't free them. Read the documentation
31 of the class carefully to find out how it behaves.
33 INPUTS
34 object - The result of a call to NewObject() or a similar function,
35 may be NULL.
37 RESULT
38 None.
40 NOTES
41 This functions sends OM_DISPOSE to the oejct.
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 NewObjectA(), SetAttrsA(), GetAttr(), MakeClass()
49 "Basic Object-Oriented Programming System for Intuition" and
50 "boopsi Class Reference" Dokument.
52 INTERNALS
54 *****************************************************************************/
56 AROS_LIBFUNC_INIT
58 STACKULONG MethodID = OM_DISPOSE;
60 DEBUG_DISPOSEOBJECT(dprintf("DisposeObject: Object 0x%lx\n", object));
62 if (!object)
63 return;
65 DoMethodA (object, (Msg)&MethodID);
67 DEBUG_DISPOSEOBJECT(dprintf("DisposeObject: 0x%lx deleted\n", object));
69 DEBUG_DISPOSEOBJECT(dprintf("DisposeObject: done\n"));
71 AROS_LIBFUNC_EXIT
72 } /* DisposeObject() */