http://code.google.com/p/pharo/issues/detail?id=1778 Stef On Jan 9, 2010, at 11:59 PM, Miguel Enrique Cobá Martinez wrote:
MCFileBasedRepository flushAllCaches. MCDefinition clearInstances. Smalltalk removeEmptyMessageCategories. Utilities cleanseOtherworldlySteppers. Undeclared removeUnreferencedKeys. Categorizer sortAllCategories. Symbol compactSymbolTable. Smalltalk at: #ReleaseBuilderDeveloper ifPresent: [:builder | builder new fixObsoleteReferences]. RequiredSelectors initialize. ProvidedSelectors initialize. LocalSends initialize. Smalltalk organization removeEmptyCategories. SystemBrowser removeObsolete. TheWorldMenu removeObsolete. AppRegistry removeObsolete. Set rehashAllSets. Smalltalk cleanOutUndeclared. Smalltalk garbageCollect.
Respect to this list, and maybe this should be a ticket. Shouldn't be better to have an established message to cleanup the image on release. Something like the cleanUpForImageRelease but generalized and then, the classes that need to do something like this, they implement that message.
So on release a new image version you only call something like
Smalltalk cleanUpForImageRelease.
and inside it search all the classes that implements the message and call them. So, your post-script becomes a single line and each package is responsible of putting inside its own cleanUpForImageRelease whatever needed to initialize itself. But well, just an idea for subsequent releases.