- HD_SCSICMD: assume there is no sense-data buffer if no AUTOSENSE
[AROS.git] / rom / oop / disposeobject.c
blob9fd101194be1587f3c7651ef05a83a0738391887
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Create a new OOP object
6 Lang: english
7 */
8 #include <exec/lists.h>
9 #include <proto/exec.h>
10 #include "intern.h"
11 #define MD(x) ((struct metadata *)x)
12 #include <aros/debug.h>
14 /*****************************************************************************
16 NAME */
17 #include <proto/oop.h>
19 AROS_LH1(VOID, OOP_DisposeObject,
21 /* SYNOPSIS */
22 AROS_LHA(OOP_Object *, obj, A0),
24 /* LOCATION */
25 struct Library *, OOPBase, 10, OOP)
27 /* FUNCTION
28 Delete an object that was previously allocated with OOP_NewObject().
30 INPUTS
31 obj - pointer to object to dispose.
33 RESULT
34 None.
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 OOP_NewObject()
45 INTERNALS
47 HISTORY
48 29-10-95 digulla automatically created from
49 intuition_lib.fd and clib/intuition_protos.h
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 ULONG mid = OOP_GetMethodID(IID_Root, moRoot_Dispose);
57 EnterFunc(bug("OOP_DisposeObject(classID=%s)\n",
58 OCLASS(obj)->ClassNode.ln_Name));
60 if (obj == NULL) return;
64 MD(OOP_OCLASS(obj))->objectcount --;
67 OOP_DoMethod(obj, (OOP_Msg)&mid);
70 ReturnVoid("OOP_DisposeObject");
72 AROS_LIBFUNC_EXIT
73 } /* OOP_DisposeObject */