owl
owl copied to clipboard
Possible Memory leak
There is no easy way to clear the memory. (no destroy method for eg).
atNodeEncounter
in QWeb.addDirective
add some content on QWeb.slots
. If we use in custom project owl, how to avoid a memory leak?
Thanks
Hey Christophe,
not sure about your specific usecase. The slots
object contains sub template compiled functions, so yes, if you add a template, then it will take up some memory. Owl assumes that you will not have a ever growing list of templates.
This may be an issue if you dynamically generate templates all the time, but I would say that it is not a common usecase. Do you need a way to remove a template, and all its subtemplates from owl?
Hi Géry,
We don't have the possibility to do that, the templates can be added dynamically and are loaded when launching the library (our editor). Several editors can coexist with different configurations and different templates. They are opened then stopped. So when we start, we create a new Qweb() and load the templates. When we stop we would like to have everything removed/destroyed.