2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: FreeNamedObject() - Free a NamedObject.
8 #include <proto/exec.h>
11 /*****************************************************************************
14 #include <proto/utility.h>
16 AROS_LH1(void, FreeNamedObject
,
19 AROS_LHA(struct NamedObject
*, object
, A0
),
22 struct UtilityBase
*, UtilityBase
, 41, Utility
)
25 Frees a NamedObject previously allocated by AllocNamedObject().
28 object - The NamedObject that you wish to free.
31 The memory used by the NamedObject will be returned to the
32 systems free memory pool.
41 utility/name.h, AllocNamedObjectA()
47 IntNamedObject, Object.
49 FreeNamedObject() may have to deal with only a partially allocated
50 object from AllocNamedObject() which has come across an error.
53 29-10-95 digulla automatically created from
54 utility_lib.fd and clib/utility_protos.h
55 11-08-96 iaint Adapted for AROS code.
56 08-10-96 iaint Modified after discussion in AROS-DEV.
57 19-10-96 iaint Finished above.
58 16-04-01 iaint Combined the memory for the name and
59 IntNamedObject as an optimisation.
61 *****************************************************************************/
67 struct IntNamedObject
*no
= GetIntNamedObject(object
);
69 if(object
->no_Object
&& no
->no_FreeObject
)
70 FreeVec(object
->no_Object
);
73 FreeMem(no
->no_NameSpace
, sizeof(struct NameSpace
));
79 } /* FreeNamedObject */