Gate icon indicating copy to clipboard operation
Gate copied to clipboard

Destructors not called, because GateRunManager not destroyed

Open brenthuisman opened this issue 7 years ago • 0 comments

I noticed that destructors for actors or filters were not called, and I could pin that down to the GateRunManager not being destroyed at the end of Gate.cc. Adding delete runManager produced a segfault but wasn't more specific than ~GateRunManager(), so I thought I would narrow the problem down by first destroying the GateActorManager, which is implemented as a singleton (I added delete GateActorManager::GetInstance(); to Gate.cc). That seemed to go well apart from the GateImageT destructor: it blows up on data.clear(), or when I remove that (it's redundant in any case) on the destruction of the data vector. I tried a few tricks (filling data with zeroes to make sure all items can be destroyed, or swapping it out with an empty vector), but no dice. GateImageT.icc:20 by the way. Not using actors using this class seems to be working for me.

Not calling any destructor for any actor or filter (anything registered under the GateRunManager really) sounds like a big deal, since most or all actors do have explicit destructors implemented. On the other hand, usually Gate terminates at this point, so perhaps not a big deal.

In any case, I thought you might like to know you wrote all those destructors for nothing ;)

brenthuisman avatar Jun 02 '17 14:06 brenthuisman