- memleak fix for my last patch
authorIngo Ruhnke <grumbel@gmx.de>
Wed, 28 Apr 2004 20:34:24 +0000 (20:34 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Wed, 28 Apr 2004 20:34:24 +0000 (20:34 +0000)
- iceflower/growup crash fix (well, maybe)

SVN-Revision: 819

src/special.cpp
src/world.cpp

index b1136c7..4ae5fcd 100644 (file)
@@ -333,12 +333,6 @@ Upgrade::collision(void* p_c_object, int c_object, CollisionType type)
           pplayer->size = BIG;
           pplayer->base.height = 64;
          pplayer->base.y -= 32;
-         if(collision_object_map(pplayer->base))
-            {
-              pplayer->base.height = 32;
-              pplayer->base.y += 32;
-              pplayer->duck = true;
-            }
         }
       else if (kind == UPGRADE_ICEFLOWER)
         {
index 7ec7eac..1c18756 100644 (file)
@@ -105,6 +105,22 @@ World::~World()
   for (ParticleSystems::iterator i = particle_systems.begin();
           i != particle_systems.end(); ++i)
     delete *i;
+
+  for (std::vector<BouncyDistro*>::iterator i = bouncy_distros.begin();
+       i != bouncy_distros.end(); ++i)
+    delete *i;
+  
+  for (std::vector<BrokenBrick*>::iterator i = broken_bricks.begin();
+       i != broken_bricks.end(); ++i)
+    delete *i;
+  
+  for (std::vector<BouncyBrick*>::iterator i = bouncy_bricks.begin();
+       i != bouncy_bricks.end(); ++i)
+    delete *i;
+
+  for (std::vector<FloatingScore*>::iterator i = floating_scores.begin();
+       i != floating_scores.end(); ++i)
+    delete *i;
   
   delete level;
 }