コード例 #1
0
 // 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);
 }
コード例 #2
0
 // 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;
 }