From eff243f65e98a57c5e1a8045f85465cd1acf085d Mon Sep 17 00:00:00 2001 From: viet54 Date: Sat, 14 Feb 2015 16:05:13 -0600 Subject: [PATCH] Fixed pools always returning new component Fixed pooled engine createComponent() always returning a new component. Due to ComponentPools class's constructor setting this.initialSize and this.maxSize to always 0. --- ashley/src/com/badlogic/ashley/core/PooledEngine.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ashley/src/com/badlogic/ashley/core/PooledEngine.java b/ashley/src/com/badlogic/ashley/core/PooledEngine.java index e83a0837..8c11b4e5 100644 --- a/ashley/src/com/badlogic/ashley/core/PooledEngine.java +++ b/ashley/src/com/badlogic/ashley/core/PooledEngine.java @@ -133,8 +133,8 @@ private class ComponentPools { public ComponentPools (int initialSize, int maxSize) { this.pools = new ObjectMap, ReflectionPool>(); - this.initialSize = 0; - this.maxSize = 0; + this.initialSize = initialSize; + this.maxSize = maxSize; } public T obtain (Class type) {