PetscFree#
Frees memory
Synopsis#
#include <petscsys.h>
PetscErrorCode PetscFree(void *memory)
Not Collective
Input Parameter#
memory - memory to free (the pointer is ALWAYS set to
NULL
upon success)
Notes#
Do not free memory obtained with PetscMalloc2()
, PetscCalloc2()
etc, they must be freed with PetscFree2()
etc.
It is safe to call PetscFree()
on a NULL
pointer.
See Also#
PetscNew()
, PetscMalloc()
, PetscMalloc1()
, PetscCalloc1()
Level#
beginner
Location#
Examples#
src/tao/complementarity/tutorials/minsurf1.c
src/tao/constrained/tutorials/tomographyADMM.c
src/tao/tutorials/ex4.c
src/tao/complementarity/tutorials/blackscholes.c
src/tao/unconstrained/tutorials/burgers_spectral.c
src/tao/tutorials/ex3.c
src/tao/unconstrained/tutorials/minsurf2.c
src/tao/pde_constrained/tutorials/parabolic.c
src/tao/unconstrained/tutorials/spectraladjointassimilation.c
src/tao/unconstrained/tutorials/minsurf1.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages