It depends on how Octomap can handle this. Otherwise I'd make it at least a class member variable.