Nominate our 2022 Qt Champions!

Lifetime of memory allocation in Plugin

  • Hi all,

    as far as I understand a plugin is unloaded either if the programm terminates or unload is called.

    Just to be sure, is it correct that in case unload was called with success all data allocated by the plugin is deleted or has the main programm take care of the memory.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    If you are thinking of memory allocated with new or malloc, then no it won't be done automatically for you. You still need to do proper memory management.

  • Sorry my question was not clear. But yes the issue was the memory allocated with new.
    Thanks for the clarification

Log in to reply