I am not exactly sure as to what you mean by going out of scope!!
But it seems to register it because when I test the size of the vector from the screen class I dont get a error and it says the entity has been properly registerd