From 58d4ea1e5a6b68595191b9cd72e99d694b0ca4d7 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Sat, 10 Sep 2022 15:34:40 +0200 Subject: [PATCH 1/3] Fix a memory leak --- Tabs/Sources/Tabs/TabBar.swift | 12 ++++++------ resources/release-notes.md | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Tabs/Sources/Tabs/TabBar.swift b/Tabs/Sources/Tabs/TabBar.swift index fa774021..b15ea798 100644 --- a/Tabs/Sources/Tabs/TabBar.swift +++ b/Tabs/Sources/Tabs/TabBar.swift @@ -115,21 +115,21 @@ extension TabBar { stack.autoPinEdge(toSuperviewEdge: .bottom) stack.spacing = self._theme.tabSpacing - stack.postDraggingHandler = { stackView, draggedView in - self.tabs = stackView.arrangedSubviews.compactMap { $0 as? Tab } + stack.postDraggingHandler = { [weak self] stackView, draggedView in + self?.tabs = stackView.arrangedSubviews.compactMap { $0 as? Tab } if let draggedTab = draggedView as? Tab, - let indexOfDraggedTab = self.tabs.firstIndex(where: { $0 == draggedTab }) + let indexOfDraggedTab = self?.tabs.firstIndex(where: { $0 == draggedTab }) { - self.reorderHandler?( + self?.reorderHandler?( indexOfDraggedTab, draggedTab.tabRepresentative, - self.tabs.map(\.tabRepresentative) + self?.tabs.map(\.tabRepresentative) ?? [] ) } let endIndex = stackView.arrangedSubviews.endIndex - 1 - self.tabs.enumerated().forEach { index, tab in + self?.tabs.enumerated().forEach { index, tab in tab.position = [] if index == 0 { tab.position.insert(.first) } if index == endIndex { tab.position.insert(.last) } diff --git a/resources/release-notes.md b/resources/release-notes.md index 73b0ce19..88a6cb2e 100644 --- a/resources/release-notes.md +++ b/resources/release-notes.md @@ -1,5 +1,9 @@ # Next +* Bugfix: Memory leak (custom tabs). + +# 0.42.0-20220703.104316 + * Add `VimRRefreshFileBrowser` and `VimRRevealCurrentBufferInFileBrowser` functions. Thanks @jaanauati for the PR! * Include `libintl` again. From 9c93f2398beba45381735a258686416e698b78dd Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Sat, 10 Sep 2022 15:38:23 +0200 Subject: [PATCH 2/3] Bump version --- VimR/VimR.xcodeproj/project.pbxproj | 8 ++++---- VimR/VimR/Info.plist | 4 ++-- VimR/VimRTests/Info.plist | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/VimR/VimR.xcodeproj/project.pbxproj b/VimR/VimR.xcodeproj/project.pbxproj index a6156ac0..6c370122 100644 --- a/VimR/VimR.xcodeproj/project.pbxproj +++ b/VimR/VimR.xcodeproj/project.pbxproj @@ -1127,7 +1127,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 20220703.104316; + CURRENT_PROJECT_VERSION = 20220910.153746; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -1188,7 +1188,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 20220703.104316; + CURRENT_PROJECT_VERSION = 20220910.153746; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -1217,7 +1217,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 20220703.104316; + CURRENT_PROJECT_VERSION = 20220910.153746; DEFINES_MODULE = YES; IBC_MODULE = VimR; INFOPLIST_FILE = VimR/Info.plist; @@ -1239,7 +1239,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 20220703.104316; + CURRENT_PROJECT_VERSION = 20220910.153746; DEFINES_MODULE = YES; IBC_MODULE = VimR; INFOPLIST_FILE = VimR/Info.plist; diff --git a/VimR/VimR/Info.plist b/VimR/VimR/Info.plist index 3f15c7c5..d0f3cc75 100644 --- a/VimR/VimR/Info.plist +++ b/VimR/VimR/Info.plist @@ -1224,7 +1224,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.42.0 + 0.42.1 CFBundleSignature ???? CFBundleURLTypes @@ -1241,7 +1241,7 @@ CFBundleVersion - 20220703.104316 + 20220910.153746 LSApplicationCategoryType public.app-category.productivity LSMinimumSystemVersion diff --git a/VimR/VimRTests/Info.plist b/VimR/VimRTests/Info.plist index 62fb2f31..873086d2 100644 --- a/VimR/VimRTests/Info.plist +++ b/VimR/VimRTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 0.42.0 + 0.42.1 CFBundleSignature ???? CFBundleVersion - 20220703.104316 + 20220910.153746 From 961b070c6f7afba72c52e26a968fd18f0676f0c0 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Sat, 10 Sep 2022 15:46:48 +0200 Subject: [PATCH 3/3] Update appcast --- appcast.xml | 17 ++++++++--------- appcast_snapshot.xml | 17 ++++++++--------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/appcast.xml b/appcast.xml index 8c4fadac..081fe4fa 100644 --- a/appcast.xml +++ b/appcast.xml @@ -6,23 +6,22 @@ Most recent changes with links to updates for VimR. en - v0.42.0-20220703.104316 + v0.42.1-20220910.153746 https://twitter.com/vimrefined - 20220703.104316 - v0.42.0 + 20220910.153746 + v0.42.1 -
  • Add VimRRefreshFileBrowser and VimRRevealCurrentBufferInFileBrowser functions. Thanks @jaanauati for the PR!
  • -
  • Include libintl again.
  • +
  • Bugfix: Memory leak (custom tabs).
  • ]]>
    - https://github.com/qvacua/vimr/releases/tag/v0.42.0-20220703.104316 + https://github.com/qvacua/vimr/releases/tag/v0.42.1-20220910.153746 - 2022-07-03T10:54:09.065903 + 2022-09-10T15:46:20.838961 10.13.0 -
    diff --git a/appcast_snapshot.xml b/appcast_snapshot.xml index 8c4fadac..081fe4fa 100644 --- a/appcast_snapshot.xml +++ b/appcast_snapshot.xml @@ -6,23 +6,22 @@ Most recent changes with links to updates for VimR. en - v0.42.0-20220703.104316 + v0.42.1-20220910.153746 https://twitter.com/vimrefined - 20220703.104316 - v0.42.0 + 20220910.153746 + v0.42.1 -
  • Add VimRRefreshFileBrowser and VimRRevealCurrentBufferInFileBrowser functions. Thanks @jaanauati for the PR!
  • -
  • Include libintl again.
  • +
  • Bugfix: Memory leak (custom tabs).
  • ]]>
    - https://github.com/qvacua/vimr/releases/tag/v0.42.0-20220703.104316 + https://github.com/qvacua/vimr/releases/tag/v0.42.1-20220910.153746 - 2022-07-03T10:54:09.065903 + 2022-09-10T15:46:20.838961 10.13.0 -