PETSc version 3.17.0
Fix/Edit manual page

# PetscHeaderDestroy

Final step in destroying a PetscObject

### Synopsis

    #define PetscHeaderDestroy(h) (PetscHeaderDestroy_Private((PetscObject)(*(h))) || PetscFree(*(h)))

    PETSC_EXTERN PetscErrorCode PetscHeaderDestroy_Private(PetscObject);
    PETSC_EXTERN PetscErrorCode PetscObjectCopyFortranFunctionPointers(PetscObject,PetscObject);
    PETSC_EXTERN PetscErrorCode PetscObjectSetFortranCallback(PetscObject,PetscFortranCallbackType,PetscFortranCallbackId*,void(*)(void),void *ctx);
    PETSC_EXTERN PetscErrorCode PetscObjectGetFortranCallback(PetscObject,PetscFortranCallbackType,PetscFortranCallbackId,void(**)(void),void **ctx);

    PETSC_INTERN PetscErrorCode PetscCitationsInitialize(void);
    PETSC_INTERN PetscErrorCode PetscFreeMPIResources(void);
    PETSC_INTERN PetscErrorCode PetscOptionsHasHelpIntro_Internal(PetscOptions,PetscBool*);

    /* Code shared between C and Fortran */
    PETSC_INTERN PetscErrorCode PetscInitialize_Common(const char*,const char*,const char*,PetscBool,PetscBool,PetscInt);

    PETSC_EXTERN PetscBool PetscCheckPointer(const void*,PetscDataType);
    #if !defined(PETSC_CLANG_STATIC_ANALYZER)
    /*
        Macros to test if a PETSc object is valid and if pointers are valid
    */
    #if !defined(PETSC_USE_DEBUG)

    #define PetscValidHeaderSpecific(h,ck,arg) do

### Input Parameters

| h | - the header created with PetscHeaderCreate()

### See Also

PetscHeaderCreate()

### Level

developer

### Location

include/petsc/private/petscimpl.h

### Examples

src/snes/tutorials/ex48.c.html
src/ts/tutorials/ex14.c.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages