Box2D Forum Archive
Search Settings
Home › Box2D › General Discussion

Cannot destroy the body

General Discussion
A archuganesh
Dec 30, 2011 22:02
for (var bb1:b2Body= world.GetBodyList(); bb1; bb1 = bb1.GetNext())
{
if (bb1.GetUserData() is Sprite)
{
world.DestroyBody(bb1);
}
}
world=null;

is it correct to remove the b2body?

but still i'm seeing the objects in stage.

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

This is an unofficial, read-only archive preserved for the community. Original site: https://box2d.org

Want your posts removed? See removal requests or email [email protected]. · Preserved with Forum Ark · Privacy · About