Program crash: GC destroys an object unexpectedly

eugene dee0xeed at gmail.com
Sun Sep 19 08:51:31 UTC 2021


> reference-containing struct that vanishes on the return of your 
> corresponding function

I do not think it's a problem, otherwise **both programs would 
not work at all**.
However, echo-server works without any surprises;
echo-client also works, except that EventSources
pointed by sg0 and sg1 data members in the Stopper instance,
are cleared by GC soon after echo-client start.
This does not mean that echo-client gets SIGSEGV right after
those objects are destroyed, no - the crash happens later,
upon receiving SIGINT or SIGTERM.


More information about the Digitalmars-d-learn mailing list