Fixed memory leak between areas from automatic surface pool size (#452)
* fixed mem leak * Add comment to second pop
This commit is contained in:
1 parent
f4b13d474a
commit
1820b146c0
2 files changed
+5
No files matched your search
@@ -360,6 +360,8 @@ static void level_cmd_clear_level(void) {
|
||||
clear_area_graph_nodes();
|
||||
clear_areas();
|
||||
main_pool_pop_state();
|
||||
// the game does a push on level load and a pop on level unload, we need to add another push to store state after the level has been loaded, so one more pop is needed
|
||||
main_pool_pop_state();
|
||||
unmap_tlbs();
|
||||
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
@@ -386,6 +388,7 @@ static void level_cmd_free_level_pool(void) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
main_pool_push_state();
|
||||
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user