about on:do: and weak

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

about on:do: and weak

Stéphane Ducasse
Hi guys

we are looking at the memory leak problems with igor and here are the conclusions:

        we are renaming on:do: for shortcut into onKey:do: so that we can see a bit more (normally easy)

Now the complex part.

        on:do: should not be used in weak announcement.
                because the block holds a context that prevents the garbage collection to reclaim the object.
        For blocks implicitly  the receiver of the message containing the block is held strongly.
        Now the block cannot

                We are adding a message in the on:do: implementation and we will have a look at the complete image.


        on:do: should only be used for strong references.

The problem is that for UI we need weak. So we are looking at users for now.

Stef