On 23 Apr 2013, at 22:00, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 23 Apr 2013, at 19:59, "Sean P. DeNigris" <sean@clipperadams.com> wrote:
Sean P. DeNigris wrote
If you run TimerTest>>#testStart from Nautilus with an open Process Browser (with auto-update enabled), you'll see the process appear and then disappear.
Although if I evaluate the snippet in the class comment of SpdLedMorph, the process hangs around. Arggghhhh. This is crazy!!!
I loaded your code and I have the impression that it works, both in the test and in a workspace. But it drives me crazy that my version does not seem to work. I will have to come back to this tomorrow with a fresh mind.
Sven
I figured out what went wrong ! Two things: - you cannot delegate the waiting on the delay to the timer instance even though that is more elegant: the problem is that then the timer instance will be on the stack during the wait, which is a strong reference, hence the timer does not become garbage (unless you happen to intervene in-between 2 waits ;-) - you cannot call #start from an inspector, that seems to create a reference from a NOCController to the inspector instance and to the timer which is being inspected; this reference remains when the inspector closes, this is again a strong reference, hence the timer does not become garbage I am not sure, but the 2nd point feels like a (potentially serious) bug⦠Sven -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill