mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-28 22:37:03 +00:00
brownian:: correct memory clearing
This commit is contained in:
parent
d901b1b140
commit
90771dfdbe
@ -176,6 +176,12 @@ namespace brownian {
|
|||||||
colors[4];
|
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 {
|
namespace westwall {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user