I looked into this, and it's not possible because the client ctor passes itself into registerObjectFactory. When this is called, the client ref count is still 0, since the client ctor has not finished. This means if registerObjectFactory takes a client_ptr, a temp will be created, upping the ref to 1, and then right back to 0 after the function call, causing a delete of the client object that is currently being constructed.