Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Mission] gets deleted after success before MissionStatePoll can trigger #564

Open
mrzzzrm opened this issue Apr 2, 2014 · 5 comments
Open
Assignees

Comments

@mrzzzrm
Copy link

mrzzzrm commented Apr 2, 2014

What the title says. That's why starting the second mission is not possible sometimes.

This is a conceptual problem, suggestions are welcome.

@psieg
Copy link
Contributor

psieg commented Apr 6, 2014

Either the missions don't get deleted immediately or you keep the missionState around in some way I
guess

@xchrdw
Copy link
Member

xchrdw commented Apr 6, 2014

manage missions with shared_ptr and let the polls keep a shared_ptr to the mission to keep it alive as long as neccessary.

@mrzzzrm
Copy link
Author

mrzzzrm commented Apr 6, 2014

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

@xchrdw
Copy link
Member

xchrdw commented Apr 6, 2014

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

@mrzzzrm
Copy link
Author

mrzzzrm commented Apr 6, 2014

I haven't figured out yet, what glow::Referenceable does. Might be worth looking into.

@mrzzzrm mrzzzrm self-assigned this Apr 7, 2014
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants