Dispose some test components
Otherwise, JunitTest_forms_unoapi_2 left behind two instances of frm::OGridControlModel. Change-Id: Idaf7bae26b18e20821968ebf52e7864043963e03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159422 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
5e8bc7bda6
commit
f9ac0d2bbb
2 changed files with 16 additions and 0 deletions
|
@ -33,6 +33,7 @@ import com.sun.star.io.XObjectInputStream;
|
|||
import com.sun.star.io.XObjectOutputStream;
|
||||
import com.sun.star.io.XOutputStream;
|
||||
import com.sun.star.io.XPersistObject;
|
||||
import com.sun.star.lang.XComponent;
|
||||
import com.sun.star.uno.UnoRuntime;
|
||||
|
||||
|
||||
|
@ -154,6 +155,11 @@ public class _XPersistObject extends MultiMethodTest {
|
|||
}
|
||||
bResult &= locRes;
|
||||
}
|
||||
|
||||
XComponent comp = UnoRuntime.queryInterface(XComponent.class, oCopy);
|
||||
if (comp != null) {
|
||||
comp.dispose();
|
||||
}
|
||||
} else {
|
||||
Object oCopy = tParam.getMSF().createInstance(sname);
|
||||
XPersistObject persCopy = UnoRuntime.queryInterface(XPersistObject.class, oCopy);
|
||||
|
@ -162,6 +168,10 @@ public class _XPersistObject extends MultiMethodTest {
|
|||
|
||||
bResult = persCopy.getServiceName().equals(sname);
|
||||
|
||||
XComponent comp = UnoRuntime.queryInterface(XComponent.class, oCopy);
|
||||
if (comp != null) {
|
||||
comp.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
} catch (com.sun.star.uno.Exception e) {
|
||||
|
|
|
@ -22,6 +22,7 @@ import lib.MultiMethodTest;
|
|||
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.sun.star.lang.XComponent;
|
||||
import com.sun.star.lang.XServiceInfo;
|
||||
import com.sun.star.lang.XTypeProvider;
|
||||
import com.sun.star.uno.UnoRuntime;
|
||||
|
@ -57,6 +58,11 @@ public class _XCloneable extends MultiMethodTest {
|
|||
result &= checkImplementationID(oObj, clone);
|
||||
|
||||
tRes.tested("createClone()", result) ;
|
||||
|
||||
XComponent comp = UnoRuntime.queryInterface(XComponent.class, clone);
|
||||
if (comp != null) {
|
||||
comp.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
protected byte[] getImplementationID(XInterface ifc) {
|
||||
|
|
Loading…
Reference in a new issue