Explicitly .delete() one more interface object in uno.js

...accidentally left over from 9184272423
"Explicitly .delete() type and interface objects in uno.js"

Change-Id: I84b1b7b5ee283a1a87f5d3aa894776b1bf23c607
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172731
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
This commit is contained in:
Stephan Bergmann
2024-09-02 08:48:21 +02:00
parent 50097952a8
commit 32ce555c9d

View File

@@ -40,10 +40,13 @@ Module.unoObject = function(interfaces, obj) {
obj.queryInterface = function(type) {
for (const i in obj.impl_typemap) {
if (i === type.toString()) {
return new Module.uno_Any(
type,
Module['uno_Type_' + i.replace(/\./g, '$')].reference(
obj.impl_interfaces[obj.impl_typemap[i]]));
const ifc = Module['uno_Type_' + i.replace(/\./g, '$')].reference(
obj.impl_interfaces[obj.impl_typemap[i]]);
try {
return new Module.uno_Any(type, ifc);
} finally {
ifc.delete();
}
}
}
const ty = Module.uno_Type.Void();