mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
show confirmation dialog for dumping snapshot
This commit is contained in:
+7
-4
@@ -231,10 +231,13 @@ public class ApplicationImpl extends ComponentManagerImpl implements Application
|
||||
Disposer.dispose(this);
|
||||
|
||||
if (isInternal() && !Disposer.isEmpty()) {
|
||||
try {
|
||||
Class.forName("com.intellij.util.ProfilingUtil").getDeclaredMethod("forceCaptureMemorySnapshot").invoke(null);
|
||||
}
|
||||
catch (Exception ignored) {
|
||||
int ret = Messages.showOkCancelDialog("Memory leaks detected. Create memory snapshot?", "Memory leaks", Messages.getErrorIcon());
|
||||
if (ret == 0) {
|
||||
try {
|
||||
Class.forName("com.intellij.util.ProfilingUtil").getDeclaredMethod("forceCaptureMemorySnapshot").invoke(null);
|
||||
}
|
||||
catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Disposer.assertIsEmpty();
|
||||
|
||||
Reference in New Issue
Block a user