Skip to content
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

Fix reflective lifetime issues #88

Merged

Conversation

LeonMatthesKDAB
Copy link
Contributor

When closing #21 , I noticed that the issue discussion still included some concerns about the lifetime of reflective connections that we didn't address in the initial PR ( #70 ).

This PR adds a test to confirm this is indeed an issue (if you checkout 030fcf4 without the fix, it should SegFault or fail).
The last commit in this PR then fixes the issue by deferring disconnection until the emit is finished.

They accidentally ended up in the ConnectionEvaluator TEST_CASE.
With the new connectReflective capability, slots can disconnect themselves.
Make sure that this doesn't cause them to delete themselves while
they're still running.
This allows slots to safely call disconnect on their own
ConnectionHandle if they are using a reflective connection.
@LeonMatthesKDAB LeonMatthesKDAB merged commit 17de31c into KDAB:main Jul 5, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants