This was (part of) the original headerfile for libBasexCpp
1 2 3 4 5 6 7 8 9
|
class BasexClient {
public:
BasexClient (const std::string&, const std::string&, const std::string&, const std::string&);
virtual ~BasexClient();
ResponseObj Command(const std::string & command);
ResponseObj Create(const std::string & dbName) { return Create(dbName, "");};
ResponseObj Create(const std::string & dbName, const std::string & content);
ResponseObj Add(const std::string & path, const std::string & input);
...
| |
I realized that these ResponseObj's were never released. So I decided to add 'ResponseObj *Response' as a public member to the class definition and to change the return value from 'ResponseObj' into void. After doing this, everything works now as planned.
So I learned that you have to be carefull when creating functions that return objects.
EDIT
It functioned one time. And the second time it failed again :-(
The search will be continued.
EDIT 2
After a reboot, now at least I can use the debugger.
In the debugger, the addRawInput function executed (the result was inserted ito the database) but this error was thrown:
terminate called after throwing an instance of 'std::bad_alloc' |
After inspecting the code I saw that I used both curlpp and cURLpp as namespace. I changed cURL into curl but that does not help.
What strategy is to be used to resolve this error?