Index: branches/PushGP/HeuristicLab.PushGP/TestPooling/Pool/IManagedPool.cs
===================================================================
--- branches/PushGP/HeuristicLab.PushGP/TestPooling/Pool/IManagedPool.cs	(revision 14745)
+++ 	(revision )
@@ -1,14 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace TestPooling.Pool
-{
-    public interface IManagedPool<T> : IDisposable
-    where T: class
-    {
-      T Get();
-    }
-}
Index: branches/PushGP/HeuristicLab.PushGP/TestPooling/Pool/ManagedPool2.cs
===================================================================
--- branches/PushGP/HeuristicLab.PushGP/TestPooling/Pool/ManagedPool2.cs	(revision 14745)
+++ 	(revision )
@@ -1,59 +1,0 @@
-﻿//using System.Collections.Generic;
-
-//namespace TestPooling.Pool {
-//  using System;
-//  using System.Collections.Concurrent;
-//  using System.IO;
-//  using System.Linq;
-//  using System.Runtime.Serialization.Formatters.Binary;
-
-//  public class ManagedPool2<T> : IDisposable where T : class {
-
-//    private static readonly ConcurrentStack<T[]> Pool = new ConcurrentStack<T[]>();
-
-//    private readonly T[] DummyPartition;
-//    public readonly int PartitionSize;
-
-//    private readonly IList<T[]> partitions = new List<T[]>();
-//    private T[] currentPartition;
-//    private int entryIndex;
-
-//    public ManagedPool2(int partitionSize, T[] dummyPartition) {
-//      PartitionSize = partitionSize;
-//      entryIndex = partitionSize;
-
-//      DummyPartition = dummyPartition;
-//    }
-
-//    public T Get() {
-//      if (entryIndex == PartitionSize) {
-//        currentPartition = GetPartition();
-//        partitions.Add(currentPartition);
-//        entryIndex = 0;
-//      }
-
-//      return currentPartition[entryIndex++];
-//    }
-
-//    private T[] GetPartition() {
-//      T[] partition;
-//      return (Pool.TryPop(out partition)) ? partition : DeepArrayCopy(DummyPartition);
-//    }
-
-//    private static T[] DeepArrayCopy(object objectToCopy) {
-//      using (var memoryStream = new MemoryStream()) {
-//        var binaryFormatter = new BinaryFormatter();
-
-//        binaryFormatter.Serialize(memoryStream, objectToCopy);
-//        memoryStream.Seek(0, SeekOrigin.Begin);
-
-//        return (T[])binaryFormatter.Deserialize(memoryStream);
-//      }
-//    }
-
-//    public void Dispose() {
-//      Pool.PushRange(partitions.ToArray());
-//      partitions.Clear();
-//    }
-//  }
-//}
Index: branches/PushGP/HeuristicLab.PushGP/TestPooling/Pool/ManagedPoolProvider.cs
===================================================================
--- branches/PushGP/HeuristicLab.PushGP/TestPooling/Pool/ManagedPoolProvider.cs	(revision 14745)
+++ branches/PushGP/HeuristicLab.PushGP/TestPooling/Pool/ManagedPoolProvider.cs	(revision 14746)
@@ -8,14 +8,24 @@
   using System.Runtime.Serialization.Formatters.Binary;
 
+  public interface IManagedPool<T> : IDisposable where T : class {
+    T Get();
+  }
+
   public class ManagedPoolProvider<T> where T : class {
     private readonly ConcurrentStack<T[]> partitions = new ConcurrentStack<T[]>();
     private readonly ObjectPool<IManagedPool<T>> managedPools;
     private T[] DummyPartition;
+
     public readonly int PartitionSize;
+    public readonly int MaxParitionCount;
+    public const int DefaultMaxInstanceCount = 16384;
 
-    public int InstanceCount { get { return partitions.Count * PartitionSize; } }
+    public ManagedPoolProvider(int partitionSize, int maxPartitionCount = -1) {
+      PartitionSize = partitionSize;
 
-    public ManagedPoolProvider(int partitionSize) {
-      PartitionSize = partitionSize;
+      if (maxPartitionCount <= 0) {
+        MaxParitionCount = DefaultMaxInstanceCount / PartitionSize;
+      }
+
       managedPools = new ObjectPool<IManagedPool<T>>(() => new ManagedPool2<T>(this));
     }
@@ -27,4 +37,6 @@
       }
     }
+
+    public int InstanceCount { get { return partitions.Count * PartitionSize; } }
 
     public void ReleasePartitions(params T[][] partition) {
