Skip to content

Commit eb06400

Browse files
committed
try to resolve some subobject cleanup potential issues
1 parent 685664a commit eb06400

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/griddyn/governors/Governor.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,14 @@ CoreObject* Governor::clone(CoreObject* obj) const
8383
return gov;
8484
}
8585

86-
// destructor
87-
Governor::~Governor() = default;
86+
// Embedded blocks are stack members, so detach them from the generic subobject list
87+
// before base-class teardown walks that list.
88+
Governor::~Governor()
89+
{
90+
removeSubObject(&delay);
91+
removeSubObject(&cb);
92+
removeSubObject(&dbb);
93+
}
8894

8995
void Governor::dynObjectInitializeA(CoreTime time0, std::uint32_t flags)
9096
{

0 commit comments

Comments
 (0)