I observed missing clean-ups for at least the following morphs:
BlobMorph: AllBlobs
NebraskaListenerMorph: does not stop listening
SpectrumAnalyzerMorph: does not stop recording
WebCamMorph: does not close camera interface
Most morphs override at least one of delete, abandon, or outOfWorld:. When deleting a project, none of these messages is sent. For Squeak Wonderland, however, a hard-coded edge already exists:
"The window in which the project is housed is about to deleted. Perform
any necessary actions to prepare for deletion."
| list |
Smalltalk at: #WonderlandCameraMorph ifPresent:[:aClass |
world submorphs do: "special release for wonderlands"
[:m | (m isKindOf: aClass)
and: [m getWonderland release]]].
"Remove Player classes and metaclasses owned by project"
self myPlayerClasses do: [:playerCls | playerCls removeFromSystemUnlogged].
Maybe we should send a new message to all open morphs from this place? Morph>>outOfProject:/projectIsClosing:/abandonWithProject:/...?
It would be more elegant if morphs would not have to implement separate messages for morph closing and project deletion. Maybe we could split up Morph>>abandon to send a new cleanUpState or similar to self, send the same message from prepareForDelete, and advise overriders of abandon to consider overiding cleanUpState instead?
I observed missing clean-ups for at least the following morphs:
BlobMorph:AllBlobsNebraskaListenerMorph: does not stop listeningSpectrumAnalyzerMorph: does not stop recordingWebCamMorph: does not close camera interfaceMost morphs override at least one of
delete,abandon, oroutOfWorld:. When deleting a project, none of these messages is sent. For Squeak Wonderland, however, a hard-coded edge already exists:Maybe we should send a new message to all open morphs from this place?
Morph>>outOfProject:/projectIsClosing:/abandonWithProject:/...?It would be more elegant if morphs would not have to implement separate messages for morph closing and project deletion. Maybe we could split up
Morph>>abandonto send a newcleanUpStateor similar to self, send the same message fromprepareForDelete, and advise overriders ofabandonto consider overidingcleanUpStateinstead?