Mir

Code review comment for lp:~mterry/mir/session-for-surface

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

Hi Michael, I'm afraid your use of shared pointers is off.

shared_ptr denotes shared ownership and, in this case the session owns the surface. It doesn't make sense for the surface to also own the session - at the very least that can create an ownership cycle (and cause a memory leak).

Having said that, as the session is guaranteed to outlive the surface I imagine an ordinary raw pointer will serve your purpose.

review: Needs Fixing

« Back to merge proposal