mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Add javadoc to ScopeChooserCombo asking not to forget to dispose ScopeChooserCombo instances to prevent memory leak
GitOrigin-RevId: a41de9cb2da075a938b916ea23278c423e47d481
This commit is contained in:
committed by
intellij-monorepo-bot
parent
63a6188eda
commit
c4f84bc8dd
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.ide.util.scopeChooser;
|
||||
|
||||
import com.intellij.ide.DataManager;
|
||||
@@ -36,6 +36,13 @@ import java.awt.event.ActionEvent;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Instances of <code>ScopeChooserCombo</code> <b>must be disposed</b> when the corresponding dialog or settings page is closed. Otherwise
|
||||
* listeners registered in <code>init()</code> cause memory leak.<br/><br/>
|
||||
* Example: if <code>ScopeChooserCombo</code> is used in a
|
||||
* <code>DialogWrapper</code> subclass, call <code>Disposer.register(getDisposable(), myScopeChooserCombo)</code>, where
|
||||
* <code>getDisposable()</code> is <code>DialogWrapper</code>'s method.
|
||||
*/
|
||||
public class ScopeChooserCombo extends ComboboxWithBrowseButton implements Disposable {
|
||||
|
||||
public static final int OPT_LIBRARIES = 0x1;
|
||||
|
||||
Reference in New Issue
Block a user