To make this work would require either not doing any initialization in the client ctor, or doing partial initialization, so that omero::registerObjectFactory(__ic, this) is called outside of the ctor. This would change client usage to creation, and then having to manually call init, so I'm wondering if it's worth it. Currently from a user perspective, there is no difference between it taking a client* and client_ptr, because of implicit casting. Changing to client_ptr also doesn't prevent passing null in, as that too would get implicitly cast. The only real difference is just in the function prototype having a client* instead of client_ptr, which is a bit inconsistent.