diff --git a/src/V3Fork.cpp b/src/V3Fork.cpp index a271874ae..133e4352f 100644 --- a/src/V3Fork.cpp +++ b/src/V3Fork.cpp @@ -445,7 +445,11 @@ public: if (typesAdded) v3Global.rootp()->typeTablep()->repairCache(); } - ~DynScopeVisitor() override = default; + ~DynScopeVisitor() override { + std::set frames; + for (auto node_frame : m_frames) { frames.insert(node_frame.second); } + for (auto* frame : frames) { delete frame; } + } }; //######################################################################