我正在发送一个HTTP请求来保存/更新服务器上的数据。该请求是异步完成的,并在完成时调用回调函数。一切正常,除了有时候,应用程序在回调中崩溃。 这是我在做什么: user = new User();
user->saveOnServer();
user->zombie = true; // Mark the user that it needs to be deleted in the cal
我正在研究Stanley B. Lippman编写的C++ Primer第4版。在第12.4.1,当即将构造函数初始化笔者会谈中,他给出了这样的例子: class ConstRef {
public:
ConstRef(int ii);
private:
int i;
const int ci;
int &ri;
};
// OK: