-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mission] gets deleted after success before MissionStatePoll can trigger #564
Comments
Either the missions don't get deleted immediately or you keep the missionState around in some way I |
manage missions with shared_ptr and let the polls keep a shared_ptr to the mission to keep it alive as long as neccessary. |
First thing is not possible (when would it be deleted? a mission shouldn't know its polls), second could be done in the MissionSystem, I guess. But the State is not the only thing one might want to query... I go for shared_ptrs as well. And I want them for ALL objects (scripts, polls, worldobjects, missions) at some point. -> #542 |
If it's a problem to pass around the shared_ptr we could take a look at glow::ref_ptr / glow::Referencable where the object keeps the count instead of some external structure |
I haven't figured out yet, what glow::Referenceable does. Might be worth looking into. |
What the title says. That's why starting the second mission is not possible sometimes.
This is a conceptual problem, suggestions are welcome.
The text was updated successfully, but these errors were encountered: