This document lists all plugin classes to search for when analyzing heap dumps to identify memory leaks after plugin unload. All classes should have count = 0 after successful plugin unload.
Expected: 1 instance per project, or 0 after unload
service.ViewServiceservice.ToolWindowServiceservice.ToolWindowServiceInterface(interface - unlikely to leak but check if implemented by plugin classes)service.StatusBarServiceservice.GitServiceservice.TargetBranchServiceimplementation.compare.ChangesService
state.Statestate.MyModelConverterstate.WindowPositionTracker
Expected: 0 after unload
listener.MyBulkFileListenerlistener.MyDynamicPluginListenerlistener.MyToolWindowListenerlistener.VcsStartuplistener.MyChangeListListenerlistener.MyGitRepositoryChangeListenerlistener.MyFileEditorManagerListenerlistener.MyTabContentListenerlistener.MyTreeSelectionListenerlistener.ToggleHeadActionlistener.VcsContextMenuAction
toolwindow.ToolWindowViewtoolwindow.ToolWindowUIFactorytoolwindow.BranchSelectViewtoolwindow.TabOperationstoolwindow.VcsTreeActions
toolwindow.actions.TabMoveActionstoolwindow.actions.TabMoveActions$MoveTabLefttoolwindow.actions.TabMoveActions$MoveTabRighttoolwindow.actions.RenameTabActiontoolwindow.actions.ResetTabNameAction
toolwindow.elements.VcsTreetoolwindow.elements.BranchTreetoolwindow.elements.BranchTreeEntrytoolwindow.elements.MySimpleChangesBrowsertoolwindow.elements.CurrentBranchtoolwindow.elements.TargetBranch
statusBar.MyStatusBarWidgetstatusBar.MyStatusBarWidgetFactorystatusBar.MyStatusBarPanel
model.MyModelmodel.MyModel$field(enum - check for RxJava subscription leaks)model.MyModelBasemodel.TargetBranchMapmodel.Debounce
implementation.lineStatusTracker.MyLineStatusTrackerImplimplementation.lineStatusTracker.CommitDiffWorkaround
implementation.scope.MyScopeimplementation.scope.MyPackageSet(registered with NamedScopeManager - critical leak if not unregistered)implementation.scope.MyScopeInTargetimplementation.scope.MyScopeNameSupplier
implementation.fileStatus.GitScopeFileStatusProvider
utils.CustomRollbackutils.GitCommitReflectionutils.GitUtilutils.Notificationsystem.Defs
These are patterns - search for classes matching these names:
TabOperations$1(rename action)TabOperations$2(reset action)TabOperations$3(move left action)TabOperations$4(move right action)VcsTree$$Lambda(any lambda from VcsTree)MyLineStatusTrackerImpl$1(BaseRevisionSwitcher anonymous inner class - circular reference)MyLineStatusTrackerImpl$$Lambda(lambdas from line status tracker)MySimpleChangesBrowser$1(anonymous MouseAdapter)BranchTree$MyColoredTreeCellRenderer- Any class ending with
$$Lambda$...
Filter the HPROF classes view using these prefixes:
service.listener.toolwindow.implementation.model.state.statusBar.utils.
- Sort by "Count" column
- Look for
count != 0 - Focus on YOUR packages (ignore
com.intellij.*,java.*,kotlin.*)
Most likely to leak:
- All listeners - Must be unregistered
- TabOperations and its anonymous classes - Actions must be unregistered
- ToolWindowView - UI components must be disposed
- ViewService - RxJava subscriptions must be disposed
- MyLineStatusTrackerImpl - Background tasks must be cancelled
- Any class with
$in the name - Anonymous/inner classes often capture outer references
- Open the
.hproffile in IntelliJ's memory profiler - Navigate to the "Classes" view
- Sort by "Count" column in descending order
- Search for each class using the package prefixes above
- Report back any classes with
count != 0and we'll fix them!