diff options
Diffstat (limited to 'Bus')
-rw-r--r-- | Bus/Ivy/IvySynchroWnd.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Bus/Ivy/IvySynchroWnd.cxx b/Bus/Ivy/IvySynchroWnd.cxx index e2b2338..cabe92c 100644 --- a/Bus/Ivy/IvySynchroWnd.cxx +++ b/Bus/Ivy/IvySynchroWnd.cxx @@ -117,6 +117,11 @@ IvySynchronousMessageCallback::IvySynchronousMessageCallback( IvyMessageCallback IvySynchronousMessageCallback::~IvySynchronousMessageCallback()
{
//delete target;
+ for( int i = 0; i < argc ; i++ )
+ {
+ delete argv[i];
+ }
+ if ( argv ) delete argv;
}
void IvySynchronousMessageCallback::OnMessage(IvyApplication *app, int argc, const char **argv )
{
@@ -128,8 +133,7 @@ void IvySynchronousMessageCallback::OnMessage(IvyApplication *app, int argc, con param->argv = new char*[argc];
for( int i = 0; i < argc ; i++ )
{
- param->argv[i] = new char[ strlen( argv[i]) +1 ];
- strcpy( param->argv[i], argv[i]);
+ param->argv[i] = strdup( argv[i]);
}
// TRACE( "IvySynchronousMessageCallback::OnMessage msg count %d\n",wParam);
m_synchro->PostIvyCB( param );
|