public void Dispose() { if (_handle >= 0) { NativePlugin.FreeRecorder(_handle); _handle = -1; // Issue the free resources plugin event NativePlugin.RenderThreadEvent(NativePlugin.PluginEvent.FreeResources, -1); } _videoEncodingHints = null; _postProcessEvent = null; }