Memory Leak

Line 295 of b2DynamicTree instanciates a static variable that is never cleared. This can cascade back to your game through UserData variables and keep the garbage collector from clearing out bits of your game.

private static var s_stack:Vector.<b2DynamicTreeNode> = new Vector.<b2DynamicTreeNode>();


Hacky fix, since no one us updating Box2d Flash anymore:

Make s_stack public and then when you want to unload Box2d just reinitialize it:
b2DynamicTree.s_stack = new Vector.<b2DynamicTreeNode>();

Colin Northway
Incredipede.com

Original thread: https://box2d.org/forum/viewtopic.php?t=8802