mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-23 07:27:07 +00:00
brownian:: correct memory clearing
This commit is contained in:
parent
d901b1b140
commit
90771dfdbe
@ -176,6 +176,12 @@ namespace brownian {
|
||||
colors[4];
|
||||
}
|
||||
|
||||
int hrc = addHook(hooks_removecells, 0, [] () {
|
||||
vector<cell*> to_remove;
|
||||
for(auto p: futures) if(is_cell_removed(p.first)) to_remove.push_back(p.first);
|
||||
for(auto r: to_remove) futures.erase(r);
|
||||
}) + addHook(clearmemory, 0, [] () { futures.clear(); });
|
||||
|
||||
}
|
||||
|
||||
namespace westwall {
|
||||
|
Loading…
Reference in New Issue
Block a user