Skip to content
  • Olav Sandstaa's avatar
    5f5addd5
    Fix for Bug#19895764 MEMORY LEAK IN UNIT TEST · 5f5addd5
    Olav Sandstaa authored
                         COSTESTIMATIONTEST.MERGEMANYBUFF
    
    The memory leak was due to the constructor for the 
    Fake_Cost_model_server class (stub implementation for
    the real Cost_model_server class) allocated a
    Server_cost_constants object that was not deleted.
    
    To ensure the Server_cost_constants object is deleted,
    this patch adds the following:
    -a destructor for the Fake_Cost_model_server class that
     deletes the allocated Server_cost_constants object
    -makes the destructor for the Cost_model_server class
     virtual to ensure that the correct destructor is called.
    5f5addd5
    Fix for Bug#19895764 MEMORY LEAK IN UNIT TEST
    Olav Sandstaa authored
                         COSTESTIMATIONTEST.MERGEMANYBUFF
    
    The memory leak was due to the constructor for the 
    Fake_Cost_model_server class (stub implementation for
    the real Cost_model_server class) allocated a
    Server_cost_constants object that was not deleted.
    
    To ensure the Server_cost_constants object is deleted,
    this patch adds the following:
    -a destructor for the Fake_Cost_model_server class that
     deletes the allocated Server_cost_constants object
    -makes the destructor for the Cost_model_server class
     virtual to ensure that the correct destructor is called.
Loading