weak_ptr and shared_ptr for task and UrlMonitor