Ignore:
Timestamp:
Nov 21, 2014 5:57:22 AM (5 years ago)
Author:
forrest
Message:

try and improve memory leaks (and clean up Clp pthread build problem)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcTree.cpp

    r2094 r2097  
    646646            // take off node
    647647            if (model->addedCuts()[i]) {
    648                 if (model->parallelMode()!=1) {
     648                if (model->parallelMode()!=1||true) {
    649649                  if (!model->addedCuts()[i]->decrement(numberLeft))
    650650                    delete model->addedCuts()[i];
     
    653653          }
    654654        }
     655#ifdef CBC_THREAD
     656        if (model->parallelMode() > 0 && model->master()) {
     657          // delete reference to node
     658          int numberThreads = model->master()->numberThreads();
     659          for (int i=0;i<numberThreads;i++) {
     660            CbcThread * child = model->master()->child(i);
     661            if (child->createdNode()==node)
     662              child->setCreatedNode(NULL);
     663          }
     664        }
     665#endif
    655666        // node should not have anything pointing to it
    656667        if (node->nodeInfo())
Note: See TracChangeset for help on using the changeset viewer.