# SNESLineSearchDestroy
Destroys the line search instance. 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESLineSearchDestroy(SNESLineSearch *linesearch)
```
Collective


## Input Parameters

- ***linesearch -*** The linesearch context





## See Also
 `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchCreate()`, `SNESLineSearchReset()`, `SNESDestroy()`

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/linesearch/impls/bt/linesearchbt.c.html#SNESLineSearchDestroy_BT">SNESLineSearchDestroy_BT in src/snes/linesearch/impls/bt/linesearchbt.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/linesearch/impls/nleqerr/linesearchnleqerr.c.html#SNESLineSearchDestroy_NLEQERR">SNESLineSearchDestroy_NLEQERR in src/snes/linesearch/impls/nleqerr/linesearchnleqerr.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/linesearch/impls/shell/linesearchshell.c.html#SNESLineSearchDestroy_Shell">SNESLineSearchDestroy_Shell in src/snes/linesearch/impls/shell/linesearchshell.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)  
