예제 #1
0
        protected virtual void Dispose(bool disposing)
        {
            lock (engine.gcSync)
            {
                if (!IsDisposed)
                {
                    if (Disposing != null)
                    {
                        Disposing.Invoke(this, null);
                    }

                    // If this is disposed, stop leaking memory!
                    if (!engine.IsDisposed)
                    {
                        engine.UnregisterWaveBank(handle);
                        FAudio.FACTWaveBank_Destroy(handle);
                    }
                    OnWaveBankDestroyed();
                }
            }
        }