Ticket #1268: MemoryLeak.patch
File MemoryLeak.patch, 1.1 KB (added by svonolfe, 14 years ago) |
---|
-
HeuristicLab.Optimization/3.3/Run.cs
86 86 } 87 87 88 88 private void Initialize(IAlgorithm algorithm) { 89 IAlgorithm clone = (IAlgorithm)algorithm.Clone();90 89 parameters = new Dictionary<string, IItem>(); 91 90 results = new Dictionary<string, IItem>(); 92 clone.CollectParameterValues(parameters); 93 clone.CollectResultValues(results); 94 if (clone.StoreAlgorithmInEachRun) { 91 92 if (algorithm.StoreAlgorithmInEachRun) { 93 IAlgorithm clone = (IAlgorithm)algorithm.Clone(); 94 clone.CollectParameterValues(parameters); 95 clone.CollectResultValues(results); 95 96 clone.Prepare(true); 96 97 this.algorithm = clone; 98 } else { 99 algorithm.CollectParameterValues(parameters); 100 algorithm.CollectResultValues(results); 97 101 } 98 102 } 99 103 [StorableHook(HookType.AfterDeserialization)]