Fix some front-end memory leaks

This commit is contained in:
Geza Lore
2023-01-01 15:31:29 +00:00
parent 6ab47f799b
commit a168d593eb
6 changed files with 13 additions and 9 deletions
+5
View File
@@ -78,6 +78,10 @@ protected:
}
}
void shutdown() {
if (s_preprocp) VL_DO_DANGLING(delete s_preprocp, s_preprocp);
}
bool preproc(FileLine* fl, const string& modname, VInFilter* filterp, V3ParseImp* parsep,
const string& errmsg) { // "" for no error
// Preprocess the given module, putting output in vppFilename
@@ -153,6 +157,7 @@ VInFilter* V3PreShellImp::s_filterp = nullptr;
// V3PreShell
void V3PreShell::boot() { V3PreShellImp::s_preImp.boot(); }
void V3PreShell::shutdown() { V3PreShellImp::s_preImp.shutdown(); }
bool V3PreShell::preproc(FileLine* fl, const string& modname, VInFilter* filterp,
V3ParseImp* parsep, const string& errmsg) {
return V3PreShellImp::s_preImp.preproc(fl, modname, filterp, parsep, errmsg);