Reading the ComponentManager class at line 100 I saw this:
[...]
Component current = components.get(e.id);
if (current != null && current != component) {
Pools.free(current);
} else {
components.set(e.id, component);
}
e.getComponentBits().set(classIndex);
[...]
I think it should be something like
[...]
Component current = components.get(e.id);
if (current != null && current != component) {
Pools.free(current);
}
components.set(e.id, component);
e.getComponentBits().set(classIndex);
[...]
because you want to free the current allocated component and put the new one in the Array.
Per @Noir707
Reading the ComponentManager class at line 100 I saw this: [...] Component current = components.get(e.id); if (current != null && current != component) { Pools.free(current); } else { components.set(e.id, component); } e.getComponentBits().set(classIndex); [...]
I think it should be something like [...] Component current = components.get(e.id); if (current != null && current != component) { Pools.free(current); } components.set(e.id, component); e.getComponentBits().set(classIndex); [...] because you want to free the current allocated component and put the new one in the Array.