eclipse-zenoh / zenoh-pico

Eclipse zenoh for pico devices
Other
102 stars 65 forks source link

Add weak references #510

Closed jean-roland closed 1 week ago

jean-roland commented 2 weeks ago

Trying to fix #476, I realised the session reference itself was dropped by the refcount which means the query has no way of knowing if the session is still valid.

A possible solution is to introduce weak references. The query having a session weak references, it would be able to check the session validity before the whole rc container is dropped.

Bonus: Working on this, I realized the z_clone was not working properly and there was a consolidation mode edge case when receiving replies.