3 Replies Latest reply: May 10, 2017 11:02 AM by David Farache RSS

    Closing an object that was opened with getObject

    dion verbeke

      Hi,

       

      I am currently opening an object in a Mashup with app.getObject().

       

      I am caching this in a javascript array.

       

      How can I remove all these objects from memory and not linking them anymore with Qlik?

       

      Dion

        • Re: Closing an object that was opened with getObject
          David Farache

          Hello Dion,

           

          I assume that you are storing your objects by doing something similar to the following:

           

          app.getObject(containerId, objectId).then(function(model){
               appObjects.push(model)
          })
          

           

          where appObjects is the array where you store the objects.

           

          Now, all you have to do in order to close the objects is the following:

           

          function closeQlikObjects(){
               appObjects.forEach(function(obj) { obj.close(); })
               appObjects = [];   
          }
          

           

          David