protected virtual void Dispose(bool disposing) { if (_ctx != null) { if (initialized) { Free(); } Native.librg_release(_ctx); _ctx = null; } }