Problem with "this" and shared_ptr