Version 2.0.2 (as far as I know, that's the latest...right?).
Using Adobes Flex 3 profiler, I noticed that my "Actor" objects didn't seem to get garbage collected like everything else when a level change occurred. I tracked down the problem to body.userData; it seems like the reference it holds is not marked for garbage collection when world.DestroyBody(body) is called.
My workaround was to add the following to the end of the DestroyBody function in b2World:
And that seems to work fine.
PS: I love Box2D! Keep up the good work guys.
Using Adobes Flex 3 profiler, I noticed that my "Actor" objects didn't seem to get garbage collected like everything else when a level change occurred. I tracked down the problem to body.userData; it seems like the reference it holds is not marked for garbage collection when world.DestroyBody(body) is called.
My workaround was to add the following to the end of the DestroyBody function in b2World:
Code:
b.m_userData = null;
b = null;
b = null;
And that seems to work fine.
PS: I love Box2D! Keep up the good work guys.