reference cycle and weak_ptr