gdx-gltf
gdx-gltf copied to clipboard
Thread-safety : get rid of static fields
Remove dangerous static reference to fields and fix possible concurrency issues
@MikOfClassX you know that removing static, for every instance you are creating new attributes, right? More memory is necessary.
That's a trade-off that not everyone is willing to take.
There are some interesting codes in your PR that could be a separate (less risky PR).
@yuripourre class data uses per-instance memory (included the static instance), Now the question is "how much ?".
I may agree with you that extra memory may have some impact as long as we have a raw idea of how much in a general scenario. Extra memory of a float vector[3] is 24 bytes per instance. Can we afford this ? Surely we can.
So, while I don't see the risk of (possible) extra bytes, I see more the benefits.