Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

When do the Loader clean resource?

$
0
0
on QML the objects are not destroyed immediately, but there is something similar to a garbage collector as a concept. So, when you change from screen1 to screen2 the object is not destroyed at the same time, but it’s delete later (means that an event of deleting is emitted and when the app process the events will eventually destroy screen1 if no other object are using it). So, in both case the screen1 will be destroyed, but this happen in a different order and that results in something strange from your point of view. If you want to check, put a Timer that every 500 ms print out the child of your Loader object and you can see that the screen1 will be destroyed in any case.

Viewing all articles
Browse latest Browse all 4972

Trending Articles