QResource: unregister .rcc files

前端 未结 1 1108
温柔的废话
温柔的废话 2021-01-28 11:52

We have an application with multiple themes, whom calls other minor apps. So, on main app there is something like that:

// User opens app with theme A
QResource         


        
相关标签:
1条回答
  • 2021-01-28 12:43

    unregisterResource returns true if the resource is successfully unloaded and no references exist for the resource.

    So in your case there could be still some more references from some other forms.

    Important documentation with respect to unregisterResource:

    If there are QResources that currently reference resources related to the unregistered file, they will continue to be valid but the resource file itself will be removed from the resource roots, and thus no further QResource can be created pointing into this resource data. The resource itself will be unmapped from memory when the last QResource that points to it is destroyed.

    So my strong guess is some QResource is still pointing to the one that you tried to unregister.

    0 讨论(0)
提交回复
热议问题