# SNESLineSearchMonitorCancel
Clears all the monitor functions for a `SNESLineSearch` object. 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESLineSearchMonitorCancel(SNESLineSearch ls)
```
Logically Collective


## Input Parameters

- ***ls -*** the `SNESLineSearch` context



## Options Database Key

- ***-snes_linesearch_monitor_cancel -*** cancels all monitors that have been hardwired
into a code by calls to `SNESLineSearchMonitorSet()`, but does not cancel those
set via the options database



## Notes
There is no way to clear one specific monitor from a `SNESLineSearch` object.

This does not clear the monitor set with `SNESLineSearchSetDefaultMonitor()` use `SNESLineSearchSetDefaultMonitor`(ls,NULL) to cancel
that one.




## See Also
 `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchMonitorDefault()`, `SNESLineSearchMonitorSet()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/linesearch/interface/linesearch.c.html#SNESLineSearchMonitorCancel">src/snes/linesearch/interface/linesearch.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/linesearch/interface/linesearch.c)


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