Changeset 11856


Ignore:
Timestamp:
02/02/15 13:19:00 (3 years ago)
Author:
abeham
Message:

#2249: Fixed recursive cloning of best solution in resultscollection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis/3.3/BestScopeSolutionAnalyzer.cs

    r11854 r11856  
    119119      if (!results.ContainsKey(BestSolutionResultName)) {
    120120        var cloner = new Cloner();
    121         //avoid cloning of subscopes
     121        //avoid cloning of subscopes and the results collection that the solution is put in
     122        cloner.RegisterClonedObject(results, new ResultCollection());
    122123        cloner.RegisterClonedObject(currentBestScope.SubScopes, new ScopeList());
    123124        var solution = cloner.Clone(currentBestScope);
     
    132133              || !max && qualities[i].Value < bestQuality) {
    133134            var cloner = new Cloner();
    134             //avoid cloning of subscopes
     135            //avoid cloning of subscopes and the results collection that the solution is put in
     136            cloner.RegisterClonedObject(results, new ResultCollection());
    135137            cloner.RegisterClonedObject(currentBestScope.SubScopes, new ScopeList());
    136138            var solution = cloner.Clone(currentBestScope);
Note: See TracChangeset for help on using the changeset viewer.