First attempt at implementing Memoization for certain Box2D objects

--HG--
branch : box2d-update
This commit is contained in:
Bill Meltsner
2011-09-24 12:20:59 -04:00
parent d35dbaa28b
commit c705063597
11 changed files with 69 additions and 0 deletions
+4
View File
@@ -25,6 +25,8 @@
#include "World.h"
#include "Physics.h"
#include <common/Memoizer.h>
namespace love
{
namespace physics
@@ -35,10 +37,12 @@ namespace box2d
: loop(loop)
{
shape = c;
Memoizer::add(shape, this);
}
ChainShape::~ChainShape()
{
Memoizer::remove(shape);
delete shape;
shape = NULL;
}