Closed brnostone closed 9 years ago
Hi there, I tried a simple example and wasn't able to reproduce it. Are you sure dispose is not called twice for the one light? If no, please provide more details about actually what Light are you trying to dispose and when, some minimal code snippet will be good.
The problem really was that I was calling twice remove. Thank you for your attention.
In version 1.2, when I call the method remove of the light, the app crash by this error:
java.lang.IllegalArgumentException: buffer not allocated with newUnsafeByteBuffer or already disposed at com.badlogic.gdx.utils.BufferUtils.disposeUnsafeByteBuffer(BufferUtils.java:507) at com.badlogic.gdx.graphics.glutils.VertexArray.dispose(VertexArray.java:67) at com.badlogic.gdx.graphics.Mesh.dispose(Mesh.java:551) at box2dLight.Light.remove(Light.java:115)
What is the solution? Thanks