fix: avoid memory usage growth over time (closes #5138)
This commit is contained in:
1 parent
2adf741355
commit
739649a749
2 files changed
+7
-1
No files matched your search
@@ -521,6 +521,11 @@ class Windows {
|
||||
}
|
||||
|
||||
static func removeWindows(_ windows: [Window], _ addWindowlessWindowIfNeeded: Bool) {
|
||||
for w in windows {
|
||||
if w.application.focusedWindow?.cgWindowId == w.cgWindowId {
|
||||
w.application.focusedWindow = nil
|
||||
}
|
||||
}
|
||||
let toRemove = windows.map { $0.lastFocusOrder }
|
||||
list.removeAll { w in
|
||||
if toRemove.contains(w.lastFocusOrder) {
|
||||
|
||||
@@ -436,9 +436,10 @@ class TilesView {
|
||||
rowSignature.append(index)
|
||||
window.rowIndex = rows.count - 1
|
||||
} else {
|
||||
// release images from unused recycledViews; they take lots of RAM
|
||||
// release images and stale window references from unused recycledViews; they take lots of RAM
|
||||
view.thumbnail.releaseImage()
|
||||
view.appIcon.releaseImage()
|
||||
view.window_ = nil
|
||||
}
|
||||
}
|
||||
scrollView.documentView!.subviews = newViews
|
||||
|
||||
Reference in new issue
Block a user