remove delegate instead of adding to autorelease pool

This commit is contained in:
Dennis Ushakov
2014-09-19 13:54:06 +04:00
parent 219258fb8c
commit 8e3568bd88
@@ -147,6 +147,8 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
}
}
finally {
invoke(contextInfo, "setDelegate:", ID.NIL);
Foundation.cfRelease(self);
Foundation.cfRelease(contextInfo);
JDK7WindowReorderingWorkaround.enableReordering();
}
@@ -339,7 +341,6 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
}
final ID delegate = invoke(Foundation.getObjcClass("NSOpenPanelDelegate_"), "new");
invoke(delegate, "autorelease");
ourImplMap.put(delegate, impl);
final ID select = toSelect == null ? null : Foundation.nsString(toSelect);