mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-17 11:30:09 +00:00
rulegen:: fix memory leak in add_other_origins
This commit is contained in:
parent
f3d7601c88
commit
ea9936c544
@ -1845,6 +1845,7 @@ void build_test();
|
||||
struct hrmap_rulegen : hrmap {
|
||||
hrmap *base;
|
||||
heptagon *origin;
|
||||
vector<heptagon*> extra_origins;
|
||||
|
||||
heptagon* gen(int s, int d, bool c7) {
|
||||
int t = arb::current.shapes[treestates[s].sid].size();
|
||||
@ -1858,7 +1859,8 @@ struct hrmap_rulegen : hrmap {
|
||||
}
|
||||
|
||||
~hrmap_rulegen() {
|
||||
clearfrom(origin);
|
||||
clearfrom(origin);
|
||||
for(auto eo: extra_origins) clearfrom(eo);
|
||||
}
|
||||
|
||||
hrmap_rulegen() {
|
||||
@ -2035,6 +2037,7 @@ EX void add_other_origins(hrmap *m0) {
|
||||
tcell_to_cell[c] = s;
|
||||
c->dist = 0;
|
||||
t_origin.push_back(c);
|
||||
m->extra_origins.push_back(extra_origin);
|
||||
}
|
||||
|
||||
println(hlog, "t_origin size = ", isize(t_origin));
|
||||
|
Loading…
x
Reference in New Issue
Block a user