[Newbies] Terminating a process while finalizing

Levente Uzonyi leves at elte.hu
Wed Dec 11 04:49:19 UTC 2013


If the process has a strong reference to your morph (via self, a local
variable, etc), or any other object referencing your morph (e.g. the home 
context of the block of the process), then the morph won't get garbage 
collected while the process is running. If it only has a weak reference to 
the morph, then it can check if the morph got garbage collected (the weak 
reference became nil), and terminate normally.


Levente

On Wed, 11 Dec 2013, Mateusz Grotek wrote:

> Hello,
> I have a morph which forks a process.
> What is the best way to terminate the process when my morph gets garbage
> collected? I tried to use finalization, but for some reason it doesn't work.
> Mateusz
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>


More information about the Beginners mailing list