Program crash: GC destroys an object unexpectedly

eugene dee0xeed at gmail.com
Sun Sep 19 09:05:27 UTC 2021


On Wednesday, 15 September 2021 at 23:07:45 UTC, jfondren wrote:
> Yep. This patch is sufficient to prevent the segfault:

Your idea (hold references to all event sources somewhere) is 
quite clear,
but it confuses me a bit, since
1) there **are** references to all event sources **already**,
they are data members in StageMachine subclasses.
2) only two of many events sources are destroyed,
namely, those which are referenced by sg1 and sg0 in Stopper 
machine of echo-client.
All other event sources are not destroyed.



More information about the Digitalmars-d-learn mailing list