use shared_ptr to manager connector