> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Close Method of the Batch Object

This method closes the batch (sets the value of the [**IBatch::IsOpen**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch.md#isopen) property to FALSE).

Release all the references to the **Batch** object, and then call this method. If a batch is not closed, it cannot be deleted from the project. As well an open batch uses more resources than a closed one. So if you have finished your work with the batch and need to free some resources, call this method to close the batch. We recommend using this method in **finally** blocks.

## Syntax

```vb Visual Basic .NET theme={null}
Sub Close()
```

```cpp C++ theme={null}
HRESULT Close();
```

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## Samples

This method is used in all [code samples](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/samples.md).

## See also

[**Batch**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch.md)

[**IBatch::Open**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch-open.md)
