[Pharo-dev] about on:do: and weak

Stéphane Ducasse stephane.ducasse at inria.fr
Sun Aug 4 09:46:28 EDT 2013


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





More information about the Pharo-dev mailing list