> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Dispose()

## Definition

Releases any device resources used for the drawing tool.

## Method Return Value

This method does not return a value.

## Syntax

`Dispose()`

## Method Parameters

This method does not accept any parameters.

## Examples

```csharp
protected override void OnStateChange()
{
   if (State == State.SetDefaults)
   {
     Name                 = @"My Drawing Tool";
   }

   else if (State == State.Terminated)
     Dispose();
}
```