Much better than before.

There is still a potential race condition through - if manager is destroyed after checking orphaned, but before (or during) the call to manager.commit().

I suspect the only way to avoid that is for CRemoteConnection to link the manager (which will potentially give you a circular reference), and change the way the manager is disposed.  Not the sort of change you want to make for 4.2.6.