hey! I see a problem here!  destructor of instance_ will never be invoked, but it should (has some IPC calls (Finish()) ). I believe you should use static scope_ptr instead of raw pointer.