:orphan: # PetscViewerStringSetOwnString tells the viewer that it now owns the string and is responsible for freeing it ## Synopsis ``` #include "petscsys.h" PetscErrorCode PetscViewerStringSetOwnString(PetscViewer viewer) ``` Logically Collective ## Input Parameter - ***viewer -*** string viewer ## Note If you call this the string must have been obtained with `PetscMalloc()` and you cannot free the string ## See Also [](sec_viewers), `PetscViewerStringOpen()`, `PETSCVIEWERSTRING`, `PetscViewerStringGetStringRead()`, `PetscViewerStringSPrintf()`, `PetscViewerStringSetString()` ## Level advanced ## Location src/sys/classes/viewer/impls/string/stringv.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/string/stringv.c) [Index of all Viewer routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)