From 433eba8cb7b07be040c605d4aa59e9c0804c1614 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:03:14 +0000 Subject: Utilisateur : Fcolin Date : 5/11/02 Heure : 9:57 Archivé dans $/Bus/Ivy Commentaire: (vss 8) --- Bus/Ivy/IvySynchroWnd.cxx | 8 ++++++-- 1 file 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 ); -- cgit v1.1