From 76b5d499de17d49c1e0d559f40eef49c5151dfed Mon Sep 17 00:00:00 2001 From: Aleksandr Krasilnikov Date: Mon, 24 Feb 2025 12:19:10 +0100 Subject: [PATCH] IJPL-178093: git: Fix memory leak in CommitChunkPanel (cherry picked from commit cedead49db5731a50ead467541bda23841df20f5) IJ-MR-155841 (cherry picked from commit 4ba6c92050e25bd345026bcb808dc3e9158695c8) (cherry picked from commit a515c8d9ec5cb0ee372f1b73cb424888eb889ef8) IJ-MR-155908 GitOrigin-RevId: 26e55158c27baeeab7161f391af1e9a030b77edd --- .../com/intellij/openapi/vcs/ex/commit/CommitChunkComponent.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/ex/commit/CommitChunkComponent.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/ex/commit/CommitChunkComponent.kt index 70c7de89e0db..d0dd4c1d0094 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/ex/commit/CommitChunkComponent.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/ex/commit/CommitChunkComponent.kt @@ -118,6 +118,8 @@ private class CommitChunkPanel(private val tracker: ChangelistsLocalLineStatusTr centerPanel.border = CommitInputBorder(editor, this) } + Disposer.register(this, commitMessage) + setupResizing(commitMessage) setupDocumentLengthTracker(commitMessage) } @@ -271,6 +273,7 @@ private class CommitChunkWorkFlowHandler( setupCommitHandlersTracking() setupCommitChecksResultTracking() vcsesChanged() + Disposer.register(this, ui) } override suspend fun updateWorkflow(sessionInfo: CommitSessionInfo): Boolean {