Line | |
---|
1 | namespace 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.