> ## 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.

# DeinitializeEngine Function

This function deinitializes ABBYY FlexiCapture 12 SDK. It unloads FlexiCapture SDK and frees resources. Call this function after you have released all ABBYY FlexiCapture SDK objects.

## Syntax

```vb Visual Basic .NET theme={null}
Private Declare Function DeinitializeEngine Lib "FCEngine.dll" () As Integer
```

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

## Return values

The function may return [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## Remarks

If there are unreleased objects when you deinitialize ABBYY FlexiCapture SDK, deinitialization completes correctly and all unreleased objects become invalid. The only thing you can do with such objects is to release them. You can get the list of unreleased objects if you call the [**IEngine::StartLogging**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/engine-startlogging.md) method before deinitialization.

## Samples

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

## See also

[Tutorial. Final Step: Unload FlexiCapture SDK](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/engine-unloading.md)

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

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