Mir

Code review comment for lp:~nick-dedekind/mir/trusted_sessions

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> There's a misuse of smart pointers - shared_ptr is about "ownership" and this
> needs to be a directed *acyclic* graph to correctly manage memory. Having the
> parent and child both "own" each other is wrong. At least one of these smart
> pointers should be a raw pointer.

I've not checked the required semantics, but another solution that might be evaluated is to use weak_ptr.

« Back to merge proposal