Commit dbc453d7 authored by Rob Latham's avatar Rob Latham
Browse files

proper memory management on finalize

parent dd9f6fdc
......@@ -137,8 +137,13 @@ int bv_delete(bv_client_t client, const char *file)
}
int bv_finalize(bv_client_t client)
{
if (client == NULL) return 0;
ssg_group_detach(client->gid);
ssg_finalize();
/* cleaning up endpoints first because endpoints need the engine to be able
* to cleanly delete themselves */
client->targets.erase(client->targets.begin(), client->targets.end());
delete client->engine;
delete client;
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment