I study example form site: http://doc.qt.io/qt-5/qtqml-javascri...tcreation.html
It is about dynamic objects creation. Notable part of this article is following example:
Qt Code:
  1. var component;
  2. var sprite;
  4. function createSpriteObjects() {
  5. component = Qt.createComponent("Sprite.qml");
  6. if (component.status == Component.Ready)
  7. finishCreation();
  8. else
  9. component.statusChanged.connect(finishCreation);
  10. }
  12. function finishCreation() {
  13. if (component.status == Component.Ready) {
  14. sprite = component.createObject(appWindow, {"x": 100, "y": 100});
  15. if (sprite == null) {
  16. // Error Handling
  17. console.log("Error creating object");
  18. }
  19. } else if (component.status == Component.Error) {
  20. // Error Handling
  21. console.log("Error loading component:", component.errorString());
  22. }
  23. }
To copy to clipboard, switch view to plain text mode 

It (optionally) splits object creation to 2 parts. It is clear that object maybe created in a bit lengthy period of time, so to avoid app freezing it returns and fire signal when ready.
In my opinion the problem with first line in quoted example:
Qt Code:
  1. var component;
To copy to clipboard, switch view to plain text mode 
What if I will create another object bertween exit createSpriteObjects() and before call finishCreation()?!? It is protected some how?!? It is impossible?!?
I think it is race! Most often it will works, but some day it will crash silently...

What is your opinion of the subject?!?

thanks and best regards
Szyk Cech