Beispiel #1
0
        override public void Dispose(bool disposing)
        {
            // If you need thread safety, use a lock around these
            // operations, as well as in your methods that use the resource.
            if (!m_disposed)
            {
                if (disposing)
                {
                    if (m_description3d != null)
                    {
                        m_description3d.Dispose();
                    }

                    if (m_secondaryBuffer != null)
                    {
                        m_secondaryBuffer.Dispose();
                    }

                    if (m_buffer3d != null)
                    {
                        m_buffer3d.Dispose();
                    }
                }

                m_description3d   = null;
                m_secondaryBuffer = null;
                m_buffer3d        = null;

                // Indicate that the instance has been disposed.
                m_disposed = true;
            }
        }
Beispiel #2
0
 private void killDXOutputBuffer()
 {
     if (dxOutputBuffer != null)
     {
         try
         {
             dxOutputBuffer.Stop();
             dxOutputBuffer.Dispose();
         }
         catch
         {
         }
         finally
         {
             dxOutputBuffer = null;
         }
     }
 }
Beispiel #3
0
 public override void Dispose()
 {
     mBuffer.Dispose();
 }