/// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="releaseOnlyManaged"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        private void Dispose(bool releaseOnlyManaged)
        {
            if (releaseOnlyManaged)
            {
                return;
            }

            // free native resources if there are any.
            if (IsInitialized)
            {
                ReleaseDeviceDiscoveryResults();
                Interop.fp_exit();
                IsInitialized = false;
            }

            // remove the reference to the singleton so it can be recreated.
            m_Instance = null;
        }
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="releaseOnlyManaged"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        private void Dispose(bool releaseOnlyManaged)
        {
            if (releaseOnlyManaged)
            {
                return;
            }

            // free native resources if there are any.
            if (IsInitialized)
            {
                ReleaseDeviceDiscoveryResults();
                Interop.fp_exit();
                IsInitialized = false;
            }

            // remove the reference to the singleton so it can be recreated.
            m_Instance = null;
        }