NAME
destruct_object - destruct an object
SYNOPSIS
void destruct_object(object obj)
DESCRIPTION
Destruct the object given as the argument. Any value holding the object
will immediately change into 0, and the object will cease to exist.
If an object destructs itself, it will cease to exist as soon as
execution leaves it. If the last reference to a master object is
removed (including cloned objects and inheriting objects), the
function remove_program(objname) will be called in the driver object.
The destructor function destroy() will be called in the object prior
to destruction. If config.h defines MUDOS_INVENTORY, all objects in
the inventory will be called as argument in master() with the
function destruct_env_of(ob). If the Master object does not move the
objects out of the way, they will be destructed.
ERRORS
Objects destructing themselves may not do certain things between the
time of destruction and the time the object will cease to exist. Most
notably, call_other() may not be used from destructed objects.
SEE ALSO
kfun/call_other, kfun/clone_object