Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hello Dion,
The function app.getObject() returns a promise, not a model. In order to bind the variable to the model you need to do something like
And then you could close it.
In order to free that memory in your browser, you would have to point the variable v to either null or undefined and the call the close function on the variable.
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
Hi Yes,
That is what I am currently doing.
I have difficulty to understand the performance charateristics of getObject.
Is this correct:
var v = app.GetObject()
Qlik Allocates memory and links with the model.
When does Qlik release this memory and the linking?
Hello Dion,
The function app.getObject() returns a promise, not a model. In order to bind the variable to the model you need to do something like
And then you could close it.
In order to free that memory in your browser, you would have to point the variable v to either null or undefined and the call the close function on the variable.