RAII ownership of the url structures