mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-15 07:32:50 +00:00
rogueviz cleanup fixup
This commit is contained in:
parent
fbea016f03
commit
19a1358607
@ -913,6 +913,8 @@ void init(void *_vizid, flagtype _vizflags) {
|
|||||||
|
|
||||||
int search_for = -1;
|
int search_for = -1;
|
||||||
|
|
||||||
|
vector<reaction_t> cleanup;
|
||||||
|
|
||||||
void close() {
|
void close() {
|
||||||
search_for = -1;
|
search_for = -1;
|
||||||
for(int i=0; i<isize(vdata); i++)
|
for(int i=0; i<isize(vdata); i++)
|
||||||
@ -925,6 +927,10 @@ void close() {
|
|||||||
anygraph::coords.clear();
|
anygraph::coords.clear();
|
||||||
callhooks(hooks_close);
|
callhooks(hooks_close);
|
||||||
edgetypes.clear();
|
edgetypes.clear();
|
||||||
|
while(!cleanup.empty()) {
|
||||||
|
cleanup.back()();
|
||||||
|
cleanup.pop_back();
|
||||||
|
}
|
||||||
vizid = nullptr;
|
vizid = nullptr;
|
||||||
relmatrices.clear();
|
relmatrices.clear();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user