protected override void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (OwnsResource())
            {
                UnsafeNativeMethods.MpCalculatorGraphDestroy(ptr);
            }

            ptr         = IntPtr.Zero;
            graphConfig = null;

            _disposed = true;
        }