:orphan:
# TSTrajectoryDestroy
Destroys a trajectory context
## Synopsis
```
#include "petscts.h"
PetscErrorCode TSTrajectoryDestroy(TSTrajectory *tj)
```
Collective
## Input Parameter
- ***tj -*** the `TSTrajectory` context obtained from `TSTrajectoryCreate()`
## See Also
[](ch_ts), `TSTrajectory`, `TSTrajectoryCreate()`, `TSTrajectorySetUp()`
## Level
developer
## Location
src/ts/trajectory/interface/traj.c
## Implementations
TSTrajectoryDestroy_Basic in src/ts/trajectory/impls/basic/trajbasic.c
TSTrajectoryDestroy_Memory in src/ts/trajectory/impls/memory/trajmemory.c
TSTrajectoryDestroy_Singlefile in src/ts/trajectory/impls/singlefile/singlefile.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/trajectory/interface/traj.c)
[Index of all TS routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)