在这个例子中如何避免内存泄漏?我是Botan的新手...
我在用 :
-赛格温
-Cmake
-botan 1.8 版本
#include <iostream>
using namespace std;
#include<botan/init.h>
#include<botan/md4.h>
int main(int argc, char ** argv) {
try {
Botan::LibraryInitializer init;
// Response res;
Botan::MD4 md4;
cout << "name: " << md4.name() << endl;
md4.clear();
init.deinitialize();
} catch (exception &e) {
cerr << e.what() << endl;
}
return 0;
}
我的编译器的输出:
name: MD4
Segmentation fault (core dumped)