petsc-3.7.1 2016-05-15
Report Typos and Errors

# PetscFree

Frees memory

### Synopsis

    #include <petscsys.h>
    PetscErrorCode PetscFree(void *memory)

Not Collective Many br

### Input Parameter

memory -memory to free (the pointer is ALWAYS set to 0 upon sucess) Many br

Many br

### Notes

Memory must have been obtained with PetscNew() or PetscMalloc(). Many brIt is safe to call PetscFree() on a NULL pointer. Many br

### See Also

PetscNew(), PetscMalloc(), PetscFreeVoid()

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

### Examples

src/sys/classes/random/examples/tutorials/ex1.c.html
src/vec/vec/examples/tutorials/ex6.c.html
src/vec/vec/examples/tutorials/ex8.c.html
src/vec/vec/examples/tutorials/ex9.c.html
src/vec/is/is/examples/tutorials/ex1.c.html
src/mat/examples/tutorials/ex2.c.html
src/mat/examples/tutorials/ex5.c.html
src/mat/examples/tutorials/ex10.c.html
src/mat/examples/tutorials/ex12.c.html
src/ksp/ksp/examples/tutorials/ex3.c.html
src/ksp/ksp/examples/tutorials/ex7.c.html