On Monday, 13 September 2021 at 17:40:41 UTC, user1234 wrote:
On Monday, 13 September 2021 at 17:18:30 UTC, eugene wrote:
[...]

At first glance and given the fact that some code necessary to diagnose the problem accurately is missing:

`new Stopper` allocates using the GC. it's then a "GC range", it's content will be scanned and handled by the GC, including `sg0` and `sg1`.

So far everything is simple.

The problems seems to lies in `newSignal()` which "would" not allocate using the GC. So when the GC reaches `sg0` and `sg1` values, indirectly when scanning a `Stopper` instance, it thinks that these they are unused and, consequently, free them.

If you dont want them to be managed by the GC remove them from the GC, using `removeRange()`.

of sorry, or maybe the opposite, so addRange...

Reply via email to