Fixed a memory leak with the Coin object where the Ogre nodes weren't
Fixed a memory leak with the Coin object where the Ogre nodes weren't
being deleted.

file:a/Coin.cpp -> file:b/Coin.cpp
--- a/Coin.cpp
+++ b/Coin.cpp
@@ -15,11 +15,11 @@
   _coinCount++;
 
   /// Mesh
-  Ogre::Entity *coinEntity=sceneMngr->createEntity("Coin"+Ogre::StringConverter::toString(_coinCount),"Coin.mesh");
-  coinEntity->setCastShadows(true);
+  _coinEntity=sceneMngr->createEntity("Coin"+Ogre::StringConverter::toString(_coinCount),"Coin.mesh");
+  _coinEntity->setCastShadows(true);
 
   _coinNode=sceneMngr->getRootSceneNode()->createChildSceneNode();
-  _coinNode->attachObject(coinEntity);
+  _coinNode->attachObject(_coinEntity);
   _coinNode->setPosition(startPos);
 
   /// Bullet
@@ -37,6 +37,8 @@
 Coin::~Coin()
 {
   delete _coinBody;
+  delete _coinNode;
+  delete _coinEntity;
 }
 
 unsigned int Coin::value()

file:a/Coin.h -> file:b/Coin.h
--- a/Coin.h
+++ b/Coin.h
@@ -27,6 +27,7 @@
   btDynamicsWorld *_world;
 
   Ogre::SceneNode *_coinNode;
+  Ogre::Entity *_coinEntity;
   btRigidBody *_coinBody;
 };