Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/PooledPushGpInterpreter.cs @ 14727

Last change on this file since 14727 was 14727, checked in by pkimmesw, 7 years ago

#2665 PushGP HL Integration, Views, Parameters

File size: 641 bytes
Line 
1namespace HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter {
2  using System;
3
4  using HeuristicLab.Core;
5  using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
6
7  public class PooledPushGpInterpreter : PushGpInterpreter, IDisposable {
8
9    private readonly PushGpInterpreterPool pool;
10
11    public PooledPushGpInterpreter(PushGpInterpreterPool pool, PushGpConfiguration config, IRandom random = null)
12      : base(config, random) {
13      this.pool = pool;
14    }
15
16    public void Dispose() {
17      this.Reset();
18      this.Configuration = this.Configuration;
19      this.pool.Free(this);
20    }
21  }
22}
Note: See TracBrowser for help on using the repository browser.