PetscObjectDelayedDestroy#
Adds an object to a data structure for later destruction.
Synopsis#
Not Collective
Input Parameter#
obj - object to be destroyed
Notes#
Analogue to PetscObjectDestroy()
for use in managed languages.
A PETSc object is given a creation index at initialisation based on
the communicator it was created on and the order in which it is
created. When this function is passed a PETSc object, a pointer to
the object is stashed on a garbage dictionary (PetscHMapObj
) which is
keyed by its creation index.
Objects stashed on this garbage dictionary can later be destroyed
with a call to PetscGarbageCleanup()
.
This function is intended for use with managed languages such as Python or Julia, which may not destroy objects in a deterministic order.
See Also#
Level#
developer
Location#
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages