# PetscObjectRegisterDestroyAll
Frees all the PETSc objects that have been registered with `PetscObjectRegisterDestroy()`. Called by `PetscFinalize()` 
## Synopsis
```
#include "petscsys.h"    
PetscErrorCode PetscObjectRegisterDestroyAll(void)
```
Logically Collective on the individual `PetscObject`s that are being processed




## See Also
 `PetscObjectRegisterDestroy()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/destroy.c.html#PetscObjectRegisterDestroyAll">src/sys/objects/destroy.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/destroy.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
