> On 24. Mar 2018, at 17:03, Holger Freyther <[email protected]> wrote:
>
>
>
> FreeTypeExternalMemory>validate just checks if the handle isValid but
> remember 1st from my previous mail. We have not _yet_ cleared the FT2Handle
> SubInstances.. So the memory is all good.
The snippet below is my work-around. I think the proper fix is to get FT2Handle
to invalidate handles a lot earlier (Gui->System startup?).
Author useAuthor: 'Hacks' during: [
FreeTypeExternalMemory addInstVarNamed: 'session'.
FreeTypeExternalMemory compile: 'validate
(session == Smalltalk session
and: [ self isValid ]) ifTrue: [ ^self ].
bytes ifNil: [ ^ self ].
session := Smalltalk session.
self primCopyToExternalMemory: bytes.
self isValid ifTrue: [ self class register: self ]'
].
Smalltalk snapshot: true andQuit: true.