Skip to content
Snippets Groups Projects
Commit 796efa87 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

fix memory leak

parent b82406cc
No related branches found
No related tags found
No related merge requests found
......@@ -30,9 +30,7 @@ template<>
class AsapoHandlerHolder < std::string> final : public AsapoHandle {
public:
AsapoHandlerHolder(const std::string& handle_i) : handle{new std::string(handle_i)} {};
~AsapoHandlerHolder() override {
handle.release();
}
~AsapoHandlerHolder() override = default;
std::unique_ptr<std::string> handle{nullptr};
};
//! handle for credentials to access a source from a producer
......
......@@ -224,8 +224,7 @@ int main(int argc, char* argv[]) {
EXIT_IF_ERROR("create consumer", err);
AsapoStringHandle group_id2 = asapo_string_from_c_str("hello");
printf("%s\n",asapo_string_c_str(group_id2));
// ASSERT_EQ_STRING("hello",asapo_string_c_str(group_id2),"asapo str <-> string");
ASSERT_EQ_STRING("hello",asapo_string_c_str(group_id2),"asapo str <-> string");
asapo_consumer_set_timeout(consumer, 1000ull);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment