mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-26 00:59:53 +00:00
free mainpanel on reload (it is not disposed by java GC for some reason)
This commit is contained in:
@@ -786,20 +786,24 @@ public class Helper {
|
||||
f.setAccessible(true);
|
||||
Object v = f.get(obj);
|
||||
if (v != null) {
|
||||
if (v instanceof Collection) {
|
||||
((Collection) v).clear();
|
||||
}
|
||||
if (v instanceof Component) {
|
||||
if (((Component) v).getParent() != null) {
|
||||
((Component) v).getParent().remove((Component) v);
|
||||
try {
|
||||
if (v instanceof Collection) {
|
||||
((Collection) v).clear();
|
||||
}
|
||||
}
|
||||
if (v instanceof Freed) {
|
||||
Freed freed = ((Freed) v);
|
||||
if (!freed.isFreeing()) {
|
||||
((Freed) v).free();
|
||||
if (v instanceof Component) {
|
||||
if (((Component) v).getParent() != null) {
|
||||
((Component) v).getParent().remove((Component) v);
|
||||
}
|
||||
}
|
||||
if (v instanceof Freed) {
|
||||
Freed freed = ((Freed) v);
|
||||
if (!freed.isFreeing()) {
|
||||
((Freed) v).free();
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
}
|
||||
|
||||
f.set(obj, null);
|
||||
}
|
||||
} catch (UnsupportedOperationException | SecurityException | IllegalArgumentException | IllegalAccessException ex) {
|
||||
|
||||
Reference in New Issue
Block a user