Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

OscListener::ProcessMessage fix potential mem leak

fix potential memory leak in the osc cinder block file
"osxcListener.cpp": when "Message* message" is passed to
callback functions, add pointer deletion to avoid memory leak
  • Loading branch information...
commit 17a1fe60439d29eb0701b4c3bc8e55d0dba64d53 1 parent e49647c
@david-demainlalune david-demainlalune authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 blocks/osc/src/OscListener.cpp
6 blocks/osc/src/OscListener.cpp
@@ -139,10 +139,12 @@ void OscListener::ProcessMessage( const ::osc::ReceivedMessage &m, const IpEndpo
lock_guard<mutex> lock(mMutex);
- if( mMessageReceivedCbs.empty() )
+ if( mMessageReceivedCbs.empty() ){
mMessages.push_back( message );
- else
+ }else{ message );
+ delete message;
+ }
bool OscListener::hasWaitingMessages() const
Please sign in to comment.
Something went wrong with that request. Please try again.