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
NULLupon 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/ksp/ksp/tutorials/ex13.c
src/ksp/ksp/tutorials/ex3.c
src/ksp/ksp/tutorials/ex87.c
src/ksp/ksp/tutorials/ex73.c
src/ksp/ksp/tutorials/ex35.cxx
src/ksp/ksp/tutorials/ex69.c
src/ksp/ksp/tutorials/ex55.c
src/ksp/ksp/tutorials/ex19.c
src/ksp/ksp/tutorials/ex36.cxx
src/ksp/ksp/tutorials/ex72.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages