summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-21 13:19:10 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-21 13:19:10 (GMT)
commit8ec6aae617525d13697d1c2a612ac37be0f341d5 (patch)
treee4cdf0795e0f77505acc0c1be544532912569959 /src/simulation/Simulation.cpp
parentd364a27ed6da5d75d1880c98c3fb2be683c5b915 (diff)
downloadpowder-8ec6aae617525d13697d1c2a612ac37be0f341d5.zip
powder-8ec6aae617525d13697d1c2a612ac37be0f341d5.tar.gz
Better cleanup for simulation - fix memory leaks
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index f7dec79..7ee0391 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -3197,7 +3197,15 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu
*/
}
-Simulation::Simulation()
+Simulation::~Simulation()
+{
+ free(signs);
+ delete grav;
+ delete air;
+}
+
+Simulation::Simulation():
+ sys_pause(0)
{
//Create and attach gravity simulation
grav = new Gravity();