It looks like the taskbarThumbnails might be leaking memory.
When moving the mouse across the taskbar viewing the different thumbnails the memory usage increases by quite a lot (viewed in the taskmanager (Windows) ).
I made an example script to illustrate the resource usage.
Test scenario: 20 windows;
1 Playground, 19 Nautilus browsers (these are minimized).
=============== Create Test Scenario ========================
19 timesRepeat: [
Nautilus openOnClass: Object.
World doOneCycle.
].
World doOneCycle.
World submorphs
select: [ :m |
m isKindOf: NautilusWindow
]
thenDo: [ :m | m minimize ]
===== Enumerate the mouse moving from one taskbarButton to the next =======
| delay |
delay := [ :msToWait |
| t |
t := Time now asMilliSeconds.
[ (Time now asMilliSeconds - t) < msToWait ]
whileTrue: [ World doOneCycle ].
].
20 timesRepeat: [
World submorphs
detect: [:m | m isTaskbar ]
ifFound: [ :taskbar |
taskbar orderedTasks collect: [ :task |
task morph
]
thenDo: [ :morph |
| button |
button := (taskbar taskButtonOf: morph).
morph taskbarButtonEntered: button event: nil in: nil.
delay value: 100.
morph taskbarButtonLeft: button event: nil in: nil.
delay value: 100
]
].
Smalltalk garbageCollect.
].
============================================================
Results: (Newest Win vm -> Image 50377)
opening the 20 Windows RAM used is 70MB.
1 iteration: 93MB
20 iterations: 130MB \ 190 MB when garbageCollect is commented out.
Should the resource usage be that high?
(a taskbarThumbnail is deleted before the next one is shown...)
Best regards,
Henrik