PetscCtxDestroyDefault — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# PetscCtxDestroyDefault

An implementation of a `PetscCtxDestroyFn` that uses `PetscFree()` to free the context

## Synopsis

    #include "petscsys.h"
    PETSC_EXTERN PetscErrorCode PetscCtxDestroyDefault(void **ctx)

## Input Parameter

- ctx - the context to be destroyed

## Note

This is not called directly, rather it is passed to `DMSetApplicationContextDestroy()`, `PetscContainerSetDestroy()`, `PetscObjectContainterCreate()` and similar routines and then called by the destructor of the associated object.

## See Also

`PetscObject`, `PetscCtxDestroyFn`, `PetscObjectDestroy()`, `DMSetApplicationContextDestroy()`, `PetscContainerSetDestroy()`, `PetscObjectContainterCreate()`

## Level

intermediate

## Location

src/sys/objects/pinit.c

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages