[Seaside] [ENH] WAComponent class>>cleanup
Kamil Kukura
kamk at volny.cz
Wed Aug 11 10:45:18 CEST 2004
This is my proposal for having chance for components to release
themselves on "Clear Caches" action.
--
Kamil
-------------- next part --------------
'From Squeak3.7gamma of ''17 July 2004'' [latest update: #5985] on 11 August 2004 at 10:34:44 am'!
"Change Set: WAComponentAddCleanup
Date: 11 August 2004
Author: Kamil Kukura
Adds #cleanup to WAComponent's classes. Sent from WADispatcherEditor>>clearCaches"!
!WAComponent class methodsFor: 'release' stamp: 'KamK 8/11/2004 10:13'!
cleanup
"release components from any class variables"
! !
!WADispatcherEditor methodsFor: 'actions' stamp: 'KamK 8/11/2004 10:24'!
clearCaches
WARegistry clearAllHandlers.
WAComponent allSubclassesDo:
[:componentClass | componentClass cleanup].
Smalltalk garbageCollect! !
!WAHalo class methodsFor: 'as yet unclassified' stamp: 'KamK 8/11/2004 10:22'!
cleanup
self initialize
! !
!WAHalo class methodsFor: 'as yet unclassified' stamp: 'KamK 8/11/2004 10:22'!
for: aComponent
^ Halos at: aComponent ifAbsentPut: [self new target: aComponent]! !
!WAHalo class methodsFor: 'as yet unclassified' stamp: 'KamK 8/11/2004 10:22'!
initialize
"WAHalo initialize"
Halos _ SeasidePlatformSupport weakDictionaryOfSize: 20
! !
WAHalo initialize!
!WAComponent class reorganize!
('registration' applicationWithPath: canBeRoot registerAsApplication: registerAsAuthenticatedApplication:)
('release' cleanup)
!
More information about the Seaside
mailing list