We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Memory Leaks In Single Page Vue.js Application

Home Forums Programming Memory Leaks In Single Page Vue.js Application

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #29442
    shantiscriptshantiscript
    Licensee

    Hi,
    i am building a single page application with vue.js and verge using your lately released vue template.
    Thanks a lot for the template, it made the setup process quite fast.

    When loading different verge scenes using vue router and the template components a memory leak occurs as the app and scene data is not cleaned up automatically. This causes the app to stop working

    I managed to fix this problem by returning the created verge App instance from the createApp() method and then using the app dispose() method to clean up the app.

    dispose verge api link

    All works well now and i can load as many scenes as i want. Here is the implementation of the script in the vue template

    The memory footprint of the app sometimes still behaves a bit strange it seems rather big after loading multiple scenes. But that could be just a strange browser behaviour.

    Thats why i wanted to ask if there is additional things that should be removed from memory??

    -The cleaned up vergeApp instance stays in memory. Should be deleted as well? Not sure if it is auto garbage collected?
    – is it enough to call dispose() or do i need to call first unload() and then dispose(). It’s not 100% clear what the difference between dispose and unload is reading the api docs
    – is there anything else that should be removed from memory (can’t think of something else but maybe i am missing something)

    Thanks for all of your great work on Verge

    Kind Regards
    Sebastian

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.