'From Squeak3.11alpha of 13 February 2010 [latest update: #9483] on 9 March 2010 at 11:11:24 am'! !SmalltalkImage methodsFor: 'image cleanup' stamp: 'edc 5/30/2008 10:16'! cleanup "SmalltalkImage current cleanup" | tasks | tasks := OrderedCollection new add: [Smalltalk removeEmptyMessageCategories]; add: [Workspace allSubInstancesDo: [:each | each setBindings: Dictionary new]]; add: [Undeclared removeUnreferencedKeys]; add: [Categorizer sortAllCategories]; add: [Symbol compactSymbolTable]; add: [#(#TheWorldMenu #FileServices #AppRegistry #Preferences #FileList ) do: [:cl | (Smalltalk at: cl) removeObsolete]]; add:[Flaps freshFlapsStart]; add:[MCFileBasedRepository flushAllCaches]; add: [HandMorph releaseCachedState; initForEvents.self fixObsoleteReferences]; add: [Smalltalk forgetDoIts. DataStream initialize. Behavior flushObsoleteSubclasses. "The pointer to currentMethod is not realy needed (anybody care to fix this) and often holds on to obsolete bindings" MethodChangeRecord allInstancesDo: [:each | each noteNewMethod: nil].Smalltalk garbageCollectMost]; yourself. Utilities informUserDuring: [:bar | tasks do: [:block | bar value: block printString. [block value] on: Error do: [:error | Transcript show: error; cr]]]. SystemNavigation default obsoleteClasses isEmpty ifTrue: [SmalltalkImage current saveSession] ifFalse: [SystemNavigation default obsoleteClasses do: [:each | .self halt.[PointerFinder on: each] on: Error do: [:error | Transcript show: error; cr]]] ! !