DATASERV (kgeom) functions


LIBRARY ROUTINE

kgeom_blast_object - free a geometry object

LIBRARY CALL

void
kgeom_blast_object(kgeom_object *object)

INPUT

OUTPUT

none

RETURN VALUE

none

DESCRIPTION

This function will destroy the given geometry object, first freeing all the primitives on the object's primitive list, and then freeing the object itself.

Note that geometry services will free all the primitives and data pointers within the geometry object. Since geometry services will try to free all memory pointed to by the geometry object, be careful not to place any static primitives or point to static arrays of data from within the geometry object. If geometry services tries to free a statically allocated pieces of memory, it will result in a fatal error.

If you wish to keep any component of the geometry object in memory, simply remove it from the geometry object prior to calling this function. For instance, to keep a primitive from an object in memory after the object has been destroyed, that primitive could first be removed with the kgeom_remove_primitive() function. Similarly, to keep a particular array of data from a primitive in memory after the associated primitive has been destroyed, the pointer to that array could be assigned to NULL. This routine will only free the primitives and data pointers which are seen within the object.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DATASERV/objects/library/kgeom/src/object.c

SEE ALSO

kgeom(3), kgeom_object, kgeom_new_object, kgeom_copy_object, kgeom_write_object, kgeom_read_object, kgeom_primitive, kgeom_new_primitive, kgeom_add_primitive, kgeom_get_primitive, kgeom_remove_primitive, kgeom_number_primitives

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.