The IDLffShape::DestroyEntity procedure method frees memory associated with the entity structure. For more information on the entity structure, see Entities.
Note: If Automatic Garbage Collection is enabled, using this method to free memory is not necessary. You may choose to destroy your entity references manually if you need to free system resources before the shapefile object is destroyed.
Syntax
Obj->[IDLffShape::]DestroyEntity, Entity
Arguments
Entity
A scalar or array of entities to be destroyed.
Keywords
None
Examples
In the following example, all of the entities from the states.shp Shapefile are read and then the DestroyEntity method is called to clean up all pointers:
PRO ex_shapefile
myshape=OBJ_NEW('IDLffShape', FILEPATH('states.shp', $
SUBDIR=['examples', 'data']))
myshape->GetProperty, N_ENTITIES=num_ent
FOR x=1, (num_ent-1) DO BEGIN
ent = myshape->GetEntity(x)
myshape->DestroyEntity, ent
ENDFOR
OBJ_DESTROY, myshape
END
Version History