static/emscripten/uno.js |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 32ce555c9daff2d4044c041e220fde44cf4aff67
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Mon Sep 2 08:48:21 2024 +0200
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Mon Sep 2 10:57:36 2024 +0200

    Explicitly .delete() one more interface object in uno.js
    
    ...accidentally left over from 91842724235bca73690d67d8084ec7581512d791
    "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.bergm...@allotropia.de>
    Tested-by: Jenkins

diff --git a/static/emscripten/uno.js b/static/emscripten/uno.js
index 6591a7441220..714dbf20dc3a 100644
--- a/static/emscripten/uno.js
+++ b/static/emscripten/uno.js
@@ -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();

Reply via email to