Re: [Pharo-users] Block that doesn't leak memory

2015-12-29 Thread webwarrior
I've looked at implementation of cleanCopy. It removes sender, but my problem is with receiver. However I wrote similar set of methods that also set receiver to nil. Seems to work fine, in debugger such blocks are seen as defined in DoIt. On 29.12.2015 3:42, Mariano Martinez Peck [via Smalltal

Re: [Pharo-users] Block that doesn't leak memory

2015-12-28 Thread Mariano Martinez Peck
This is halt related, but you can see how Fuel checks wether the closure is "clean" and if true, it serializes a pruned version of it so that to avoid a whole stack. See BlockClosure >> fuelAccept: fuelAccept: aGeneralMapper ^ self *shouldBeSubstitutedByCleanCopy* "The 'onRecursionDo:' is just to

Re: [Pharo-users] Block that doesn't leak memory

2015-12-27 Thread Clément Bera
There is no way of creating such blocks currently. In fact only non local returns and debugging are problems as remote variables are accessed through an indirection. A lightweight block (to reuse your terms) with no outer context but accesses to remote temporary variables would work fine. The com