| 64 | } |
| 65 | |
| 66 | b2World::~b2World() |
| 67 | { |
| 68 | // Some shapes allocate using b2Alloc. |
| 69 | b2Body* b = m_bodyList; |
| 70 | while (b) |
| 71 | { |
| 72 | b2Body* bNext = b->m_next; |
| 73 | |
| 74 | b2Fixture* f = b->m_fixtureList; |
| 75 | while (f) |
| 76 | { |
| 77 | b2Fixture* fNext = f->m_next; |
| 78 | f->m_proxyCount = 0; |
| 79 | f->Destroy(&m_blockAllocator); |
| 80 | f = fNext; |
| 81 | } |
| 82 | |
| 83 | b = bNext; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | void b2World::SetDestructionListener(b2DestructionListener* listener) |
| 88 | { |