Skip to main content
`Ctrl`+`K`

# PetscFree3

Frees 3 chunks of memory obtained with `PetscMalloc3()`

## Synopsis

    #include <petscsys.h>
    PetscErrorCode PetscFree3(void *memory1,void *memory2,void *memory3)

Not Collective

## Input Parameters

- memory1 - memory to free

- memory2 - 2nd memory to free

- memory3 - 3rd memory to free

## Notes

Memory must have been obtained with `PetscMalloc3()`

The arguments need to be in the same order as they were in the call to `PetscMalloc3()`

## See Also

`PetscNew()`, `PetscMalloc()`, `PetscMalloc2()`, `PetscFree()`, `PetscMalloc3()`

## Level

developer

## Location

include/petscsys.h

## Examples

src/ts/tutorials/ex9.c
src/ksp/ksp/tutorials/ex35.cxx
src/ts/tutorials/ex18.c
src/ksp/ksp/tutorials/ex36.cxx
src/ksp/ksp/tutorials/bench_kspsolve.c
src/ts/tutorials/extchem.c
src/ts/tutorials/extchemfield.c
src/vec/is/sf/tutorials/ex1.c
src/ksp/ksp/tutorials/ex74.c
src/ts/tutorials/ex53.c

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