Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/23/17 14:28:28 (7 years ago)
Author:
abeham
Message:

#2457: fixed memory leak in MemPR

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Algorithms.MemPR/3.3/SingleObjectiveSolutionScope.cs

    r14453 r14694  
    9191      this.solution = new Variable(codeName, code);
    9292      this.fitness = new Variable(fitnessName, new DoubleValue(fitness));
    93       variables = new VariableCollection(2) { this.solution, this.fitness };
     93      variables = new VariableCollection(new [] { this.solution, this.fitness });
    9494      subScopes = new ScopeList(2);
    9595
     
    137137
    138138    public void Adopt(ISingleObjectiveSolutionScope<T> orphan) {
    139       Solution = orphan.Solution;
     139      Solution = (T)orphan.Solution.Clone();
    140140      Fitness = orphan.Fitness;
    141141    }
Note: See TracChangeset for help on using the changeset viewer.