Tests: Fix leak found by previous commit
This commit is contained in:
parent
e1a48dcb07
commit
dad86b9a84
|
|
@ -786,8 +786,8 @@ private:
|
||||||
// Static doesn't need save-restore as if below will re-fill proper value
|
// Static doesn't need save-restore as if below will re-fill proper value
|
||||||
stmt += "static int __Vfuncnum = -1;\n";
|
stmt += "static int __Vfuncnum = -1;\n";
|
||||||
// First time init (faster than what the compiler does if we did a singleton
|
// First time init (faster than what the compiler does if we did a singleton
|
||||||
stmt += "if (VL_UNLIKELY(__Vfuncnum == -1)) { __Vfuncnum = Verilated::exportFuncNum(\""
|
stmt += "if (VL_UNLIKELY(__Vfuncnum == -1)) __Vfuncnum = Verilated::exportFuncNum(\""
|
||||||
+ nodep->cname() + "\"); }\n";
|
+ nodep->cname() + "\");\n";
|
||||||
// If the find fails, it will throw an error
|
// If the find fails, it will throw an error
|
||||||
stmt += "const VerilatedScope* __Vscopep = Verilated::dpiScope();\n";
|
stmt += "const VerilatedScope* __Vscopep = Verilated::dpiScope();\n";
|
||||||
// If dpiScope is fails and is null; the exportFind function throws and error
|
// If dpiScope is fails and is null; the exportFind function throws and error
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,7 @@ int main(int argc, char** argv, char** env) {
|
||||||
|
|
||||||
#ifdef TEST_HDR_TRACE
|
#ifdef TEST_HDR_TRACE
|
||||||
if (tfp) tfp->close();
|
if (tfp) tfp->close();
|
||||||
|
VL_DO_DANGLING(delete tfp, tfp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VL_DO_DANGLING(delete ap, ap);
|
VL_DO_DANGLING(delete ap, ap);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue