反序列化正在工作,问题在于内存泄漏。 我已经尝试删除's'指针,但有'Targeting failure',我无法删除指针。使用boost :: archive :: binary_iarchive的内存泄漏
//Statment MySql
sql::Statement *_stmt = this->con->createStatement();
sql::ResultSet *_result = _stmt->executeQuery("SELECT * FROM matches ORDER BY `match_seq_num` ASC LIMIT 1250");
while(_result->next()){
std::istream *s = _result->getBlob("match_object");
boost::archive::binary_iarchive ia(*s);
Match _match;
ia >> _match;
delete s;
}
delete _result;
delete _stmt;
的问题是使用boost::archive::binary_iarchive ia(*s);
反序列化从MySQL传来的信息后删除的“指针。
我从来没有见过这样的使用iarchive。该错误可能在您的不透明函数getBlob()中。 –