diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-25 18:42:35 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-25 18:42:35 (GMT) |
| commit | c5cc1870f3ec0d9b6499b04b4ab2123bcf58db84 (patch) | |
| tree | a21e48a8daad6f023cfbb5ab7ffb393918a5f5c1 /src/simulation/Simulation.cpp | |
| parent | 8b80942b16fd6292884fb3208bc52c29a25cfff8 (diff) | |
| download | powder-c5cc1870f3ec0d9b6499b04b4ab2123bcf58db84.zip powder-c5cc1870f3ec0d9b6499b04b4ab2123bcf58db84.tar.gz | |
Fix some memory leaks
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 61d8ae7..243b903 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3185,18 +3185,23 @@ Simulation::Simulation(): int menuCount; menu_section * msectionsT = LoadMenus(menuCount); memcpy(msections, msectionsT, menuCount * sizeof(menu_section)); + free(msectionsT); int wallCount; wall_type * wtypesT = LoadWalls(wallCount); memcpy(wtypes, wtypesT, wallCount * sizeof(wall_type)); + free(wtypesT); int elementCount; part_type * ptypesT = LoadElements(elementCount); memcpy(ptypes, ptypesT, elementCount * sizeof(part_type)); + free(ptypesT); int transitionCount; part_transition * ptransitionsT = LoadTransitions(transitionCount); memcpy(ptransitions, ptransitionsT, sizeof(part_transition) * transitionCount); + free(ptransitionsT); + init_can_move(); clear_sim(); } |
