我有一些使用这样的矢量的简单函数(伪代码):
void someFunc(void) {
std::vector<std::string> contentVector;
// here are some operations on the vector
// should I call the clear() here or this could be ommited ?
contentVector.clear();
}
Run Code Online (Sandbox Code Playgroud)
我应该调用clear()还是可以省略这个?
我想阻止选定的网站安装服务工作人员或完全禁用安装服务工作人员的能力。
我怎样才能做到这一点 ?