Fix memory leak stream UDP

This commit is contained in:
brunoherbelin
2020-11-01 23:32:40 +01:00
parent b8ebab5766
commit 0738c25fb4
8 changed files with 33 additions and 21 deletions

View File

@@ -22,6 +22,13 @@ Connection::Connection()
receiver_ = nullptr;
}
Connection::~Connection()
{
if (receiver_!=nullptr)
delete receiver_;
}
bool Connection::init()
{
// add default info for myself
@@ -161,7 +168,6 @@ void Connection::ask()
p << Connection::manager().connections_[0].port_handshake;
p << osc::EndMessage;
// loop infinitely
while(true)
{