Wrapping the shared_ptr in Config, and cleaning up with SetFinalizer()