namespace HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter { using System; using HeuristicLab.Core; using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration; public class PooledPushGpInterpreter : PushGpInterpreter, IDisposable { private readonly PushGpInterpreterPool pool; public PooledPushGpInterpreter(PushGpInterpreterPool pool, PushGpConfiguration config, IRandom random = null) : base(config, random) { this.pool = pool; } public void Dispose() { this.Reset(); this.Configuration = this.Configuration; this.pool.Free(this); } } }