# PetscFree

Frees memory

### Input Parameter

memory -memory to free

### Synopsis

    PetscErrorCode PetscFree(void *memory)

Notes: Memory must have been obtained with PetscNew() or PetscMalloc()

### See Also

PetscNew(), PetscMalloc()

Level:beginner
Location:include/petsc.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/vec/is/examples/tutorials/ex1.c.html
src/vec/examples/tutorials/ex6.c.html
src/vec/examples/tutorials/ex8.c.html
src/vec/examples/tutorials/ex9.c.html
src/mat/examples/tutorials/ex5.c.html
src/ksp/examples/tutorials/ex3.c.html
src/ksp/examples/tutorials/ex7.c.html
src/ksp/examples/tutorials/ex8.c.html
src/ksp/examples/tutorials/ex10.c.html
src/ksp/examples/tutorials/ex13.c.html
src/ksp/examples/tutorials/ex15.c.html