# SNESLineSearchReset
Undoes the `SNESLineSearchSetUp()` and deletes any `Vec`s or `Mat`s allocated by the line search. 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESLineSearchReset(SNESLineSearch linesearch)
```
Collective on linesearch


## Input Parameters

- ***linesearch -*** The `SNESLineSearch` instance.



## Note
Usually only called by `SNESReset()`




## See Also
 `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchSetUp()`

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/linesearch/impls/nleqerr/linesearchnleqerr.c.html#SNESLineSearchReset_NLEQERR">SNESLineSearchReset_NLEQERR in src/snes/linesearch/impls/nleqerr/linesearchnleqerr.c</A><BR>


---
[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)  
