FreeIpoptProblem() private method

private FreeIpoptProblem ( IntPtr ipopt_problem ) : void
ipopt_problem System.IntPtr
return void
Beispiel #1
0
        /// <summary>
        /// Dispose(bool disposing) executes in two distinct scenarios.
        /// If disposing equals true, the method has been called directly
        /// or indirectly by a user's code. Managed and unmanaged resources
        /// can be disposed.
        /// If disposing equals false, the method has been called by the
        /// runtime from inside the finalizer and you should not reference
        /// other objects. Only unmanaged resources can be disposed.
        /// </summary>
        /// <param name="disposing">true if Dispose method is explicitly called, false otherwise.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!m_disposed)
            {
                if (m_problem != IntPtr.Zero)
                {
                    IpoptAdapter.FreeIpoptProblem(m_problem);
                }

                if (disposing)
                {
                    m_problem = IntPtr.Zero;
                }

                m_disposed = true;
            }
        }
Beispiel #2
0
 public void Teardown()
 {
     IpoptAdapter.FreeIpoptProblem(_instance);
     _hs037 = null;
 }