mirror of https://github.com/vitalif/openscad
Killed some memory leaks
parent
04c340b35d
commit
0fee2c5540
|
@ -196,6 +196,9 @@ int main(int argc, char **argv)
|
|||
csgInfo.glview->paintGL();
|
||||
csgInfo.glview->save(outfile);
|
||||
|
||||
delete root_node;
|
||||
delete root_module;
|
||||
|
||||
Builtins::instance(true);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -143,6 +143,10 @@ int main(int argc, char **argv)
|
|||
}
|
||||
outfile.close();
|
||||
|
||||
if (root_term) root_term->unlink();
|
||||
delete root_node;
|
||||
delete root_module;
|
||||
|
||||
Builtins::instance(true);
|
||||
|
||||
return rc;
|
||||
|
|
|
@ -216,6 +216,9 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type)
|
|||
|
||||
csgInfo.glview->save(outfilename);
|
||||
|
||||
delete root_node;
|
||||
delete root_module;
|
||||
|
||||
Builtins::instance(true);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -129,6 +129,9 @@ int main(int argc, char **argv)
|
|||
outfile << csgcache[*root_node] << "\n";
|
||||
outfile.close();
|
||||
|
||||
delete root_node;
|
||||
delete root_module;
|
||||
|
||||
Builtins::instance(true);
|
||||
|
||||
return rc;
|
||||
|
|
|
@ -139,6 +139,9 @@ int main(int argc, char **argv)
|
|||
outfile << dumpstdstr << "\n";
|
||||
outfile.close();
|
||||
|
||||
delete root_node;
|
||||
delete root_module;
|
||||
|
||||
root_module = parsefile(outfilename);
|
||||
if (!root_module) {
|
||||
fprintf(stderr, "Error: Unable to read back dumped file\n");
|
||||
|
@ -159,6 +162,9 @@ int main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
delete root_node;
|
||||
delete root_module;
|
||||
|
||||
Builtins::instance(true);
|
||||
|
||||
return rc;
|
||||
|
|
|
@ -124,6 +124,9 @@ int main(int argc, char **argv)
|
|||
AbstractNode::resetIndexCounter();
|
||||
root_node = root_module->evaluate(&root_ctx, &root_inst);
|
||||
|
||||
delete root_node;
|
||||
delete root_module;
|
||||
|
||||
Builtins::instance(true);
|
||||
ofile.close();
|
||||
return rc;
|
||||
|
|
|
@ -39,3 +39,14 @@
|
|||
fun:(below main)
|
||||
}
|
||||
|
||||
{
|
||||
Qt misc leaks
|
||||
Memcheck:Leak
|
||||
fun:calloc
|
||||
...
|
||||
fun:_Z7qt_initP19QApplicationPrivatei
|
||||
fun:_ZN19QApplicationPrivate9constructEv
|
||||
fun:_ZN12QApplicationC2ERiPPcbi
|
||||
fun:main
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue