[squeak-dev] Class cleanUp protocol

Igor Stasenko siguctua at gmail.com
Fri Feb 26 23:46:55 UTC 2010


I'm happy to see that!
A common protocol is a way to go!

On 27 February 2010 01:41, Andreas Raab <andreas.raab at gmx.de> wrote:
> Hi -
>
> Apologies for the many commit messages but I've adopted Keith's proposed
> cleanUp protocol for classes. After writing a few more custom cleanups I was
> just to fed up with all of the magic lore in this area. Instead, we now have
> a common cleanUp protocol:
>
>        MyClass class>>cleanUp: aggressive
>
> This (class-side) method is called with an argument that indicates whether
> to do aggressive, i.e., potentially destructive cleanup. Doing aggressive
> cleanup will delete projects, change sets, uni-classes and more. Gentle
> cleanup is expected to only flush transient caches. If your class only has
> gentle cleanup you can simply implement
>
>        MyClass class>>cleanUp
>
> By default #cleanUp: delegates to this method (similar to startUp/startUp:
> and shutDown/shutDown:). You can run cleanup by executing:
>
>        Smalltalk cleanUp. "gently"
>        Smalltalk cleanUp: true. "aggressive"
>
> There is probably still more cleanups but I've taken a first round on adding
> those cleanups that I was aware about. Hopefully, we can now put all the
> various magic cleanup methods in ReleaseBuilder and Smalltalk to rest.
>
> Cheers,
>  - Andreas
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list