[squeak-smalltalk/squeak-object-memory] Morphs not cleaned up when closing a MorphicProject (Issue #162)
Christoph Thiede via Squeak-dev <[email protected]> Wed, 08 Jul 2026 11:06:47 -0700
| Newsgroups | gmane.comp.lang.smalltalk.squeak.general |
|---|---|
| Message-ID | <squeak-smalltalk/squeak-object-memory/issues/[email protected]> |
LinqLover created an issue (squeak-smalltalk/squeak-object-memory#162) 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: ```MorphicProject>>prepareForDelete "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? -- Reply to this email directly or view it on GitHub: https://github.com/squeak-smalltalk/squeak-object-memory/issues/162 You are receiving this because you are subscribed to this thread. Message ID: <squeak-smalltalk/squeak-object-memory/issues/[email protected]> Squeak-dev mailing list -- [email protected] To unsubscribe send an email to [email protected]