petsc-3.7.1 2016-05-15
Report Typos and Errors

# PetscObjectRegisterDestroy

Registers a PETSc object to be destroyed when PetscFinalize() is called.

### Synopsis

    #include "petscsys.h"
    PetscErrorCode  PetscObjectRegisterDestroy(PetscObject obj)

Logically Collective on PetscObject Many br

### Input Parameter

obj -any PETSc object, for example a Vec, Mat or KSP. Many brThis must be cast with a (PetscObject), for example, Many brPetscObjectRegisterDestroy((PetscObject)mat); Many br

Many br

### Notes

This is used by, for example, PETSC_VIEWER_XXX_() routines to free the viewer Many brwhen PETSc ends. Many br

### See Also

PetscObjectRegisterDestroyAll()

Level:developer
Location:src/sys/objects/destroy.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages