:orphan:
# PetscContainerCreate
Creates a PETSc object that has room to hold a single pointer. This allows one to attach any type of data (accessible through a pointer) with the `PetscObjectCompose()` function to a `PetscObject`. The data item itself is attached by a call to `PetscContainerSetPointer()`. 
## Synopsis
```
#include "petscsys.h"    
PetscErrorCode PetscContainerCreate(MPI_Comm comm, PetscContainer *container)
```
Collective


## Input Parameter

- ***comm -*** MPI communicator that shares the object



## Output Parameter

- ***container -*** the container created





## See Also
 `PetscContainerDestroy()`, `PetscContainerSetPointer()`, `PetscContainerGetPointer()`, `PetscObjectCompose()`, `PetscObjectQuery()`,
`PetscContainerSetUserDestroy()`, `PetscObject`

## Level
advanced

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


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


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