# PetscObjectListRemoveReference
Calls `PetscObjectDereference()` on an object in the list immediately but keeps a pointer to the object in the list. 
## Synopsis
```
PetscErrorCode PetscObjectListRemoveReference(PetscObjectList *fl, const char name[])
```

## Input Parameters

- ***fl -*** the object list
- ***name -*** the name to use for the object





## Notes
Use `PetscObjectListAdd`(`PetscObjectList`,const char name[],NULL) to truly remove the object from the list

Use this routine ONLY if you know that the object referenced will remain in existence until the pointing object is destroyed


## Developer Note
This is to handle some cases that otherwise would result in having circular references so reference counts never got to zero


## See Also
 `PetscObjectListDestroy()`, `PetscObjectListFind()`, `PetscObjectListDuplicate()`, `PetscObjectListReverseFind()`, `PetscObjectListDuplicate()`, `PetscObjectListAdd()`

## Level
developer

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/olist.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)  
