Skip to content

Commit

Permalink
Merge pull request #972 from AlexisCnockaert/MemoryLeakFix
Browse files Browse the repository at this point in the history
Memory leak fix
  • Loading branch information
Ducasse authored Feb 1, 2025
2 parents 3bcbbad + 40abc5d commit aa7806f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
5 changes: 4 additions & 1 deletion src/BaselineOfNewTools/BaselineOfNewTools.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ BaselineOfNewTools >> baseline: spec [
group: 'Core' with: #( 'NewTools-Core' 'NewTools-Core-Tests' 'NewTools-Morphic' );
group: 'Playground' with: #( 'Core' 'NewTools-Playground' 'NewTools-Playground-Tests' );
group: 'Inspector' with: #( 'Core' 'NewTools-Inspector' 'NewTools-Inspector-Tests' );
group: 'ClosedWindows' with: #( 'Core' 'NewTools-WindowManager');
group: 'Debugger' with: #(
'Core'
'Inspector'
Expand Down Expand Up @@ -195,6 +196,7 @@ BaselineOfNewTools >> baseline: spec [
group: 'default' with: #(
'Playground'
'Inspector'
'ClosedWindows'
'CritiqueBrowser'
'Debugger'
'SystemReporter'
Expand Down Expand Up @@ -261,7 +263,8 @@ BaselineOfNewTools >> packageRepositoryURLForSpec: spec [
BaselineOfNewTools >> postload: loader package: packageSpec [

MCMethodDefinition initializersEnabled: initializersEnabled.
self loadThemeImages
self loadThemeImages.
SystemWindow useHideForClose: true
]

{ #category : 'actions' }
Expand Down
22 changes: 11 additions & 11 deletions src/NewTools-WindowManager/SpClosedWindowListPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ Class {
'unhideButton',
'removeButton',
'unhideItemBlock',
'removeItemBlock',
'title'
'removeItemBlock'
],
#classInstVars : [
'lastClosedWindows'
Expand Down Expand Up @@ -78,23 +77,24 @@ SpClosedWindowListPresenter class >> windowMenuOn: aBuilder [
SpClosedWindowListPresenter class >> windowsOn: aBuilder [

<worldMenu>
(aBuilder group: #Windows) with: [

(aBuilder item: #'Unclose window')
order: 90;
parent: #Windows;
order: 1;
action: [ self new open ];
help: 'Show last 5 closed Windows' ]
help: 'Show last 5 closed Windows'
]

{ #category : 'adding' }
SpClosedWindowListPresenter >> addClosedWindow: aModel [

self lastClosedWindows size >= 5 ifTrue: [
self lastClosedWindows removeLast close ].
aModel labelString = 'Last Closed Windows' ifFalse: [
self lastClosedWindows addFirst: aModel.
aModel setProperty: #isClosed toValue: true ].
5 to: self lastClosedWindows size do: [ :i |
self lastClosedWindows removeLast close ] ].
aModel labelString = 'Last Closed Windows'
ifFalse: [ self lastClosedWindows addFirst: aModel ]
ifTrue: [ aModel closeBoxHit ].
self refresh

]

{ #category : 'initialization' }
Expand Down

0 comments on commit aa7806f

Please sign in to comment.