// The constraint MUST exist in the collection public bool RemoveAndDestroyConstraint(BSConstraint constrain) { lock (m_constraints) { // remove the constraint from our collection m_constraints.Remove(constrain); } // tell the engine that all its structures need to be freed constrain.Dispose(); // we destroyed something return(true); }
// The constraint MUST exist in the collection public bool RemoveAndDestroyConstraint(BSConstraint constrain) { lock (m_constraints) { // remove the constraint from our collection m_constraints.Remove(constrain); } // tell the engine that all its structures need to be freed constrain.Dispose(); // we destroyed something return true; }