LiMeshingRefinementDestroy

FunctionLtStatus
LiMeshingRefinementDestroy( LtMeshingRefinement destroy_me
)
Synopsis Destroy the specified meshing refinement.
Locationligeops
Parameters
destroy_me The meshing refinement to be destroyed.
Return Value An indication of success, error or failure.

Description Allows us to destroy a meshing refinement that has previously been created using either LiMeshingRefinementCreate or LiMeshingRefinementCopy. This is so that application programmers are able to manage the memory they take up when they utilise meshing refinements.

Attempting to destroy a NULL refinement, will result in failure. Similarly for a refinement that has already been destroyed.

Meshing refinements make use of a `use count', not visible to the ADS user, which ensures that refinements are only wiped from memory when they are no longer being used anywhere. So, if a refinement is created, and attached to 4 primitives, its use count will be 5. When these 4 primitives are destroyed, its use count will drop to 1, at which point we can use LiMeshingRefinementDestroy to tidy up the allocated memory.

Example
/*
 * Destroy a meshing refinement that I am finished with
 */
status = LiMeshingRefinementDestroy(ref);
if ( not status )
   /* error */
See Also LiPrimitiveTriangulate
LiPrimitiveHierarchicalTriangulate
LiMeshingRefinementUnSetCriterion
LiMeshingRefinementSetCriterion
LiMeshingRefinementCriterionState
LiMeshingRefinementGetCriterion
LiPrimitiveSetMeshingRefinement
LiPrimitiveGetMeshingRefinement
LiMeshingRefinementCreate
LiMeshingRefinementDebug
LiMeshingRefinementCopy

Copyright © 1990-1998, 1999 LightWork Design Limited. All rights reserved