在堆栈上分配的变量上调用delete
忽略编程风格和设计,在堆栈上分配的变量上调用delete是“安全的”吗?
例如:
int nAmount; delete &nAmount;
要么
class sample{public: sample(); ~sample() { delete &nAmount;} int nAmount;}
子衿沉夜
达令说
守着一只汪
相关分类