[Ace-users] [ace-users] ACE_Stream beginner problem
Douglas C. Schmidt
schmidt at dre.vanderbilt.edu
Tue Jan 15 20:33:13 CST 2008
Hi Roberto,
>Valgrind reported this lines of Stream.cpp :
>
>line 335
>ACE_NEW_RETURN (h1,ACE_Stream_Head<ACE_SYNCH_USE>,-1);
>line 338
>ACE_NEW_RETURN (h2,ACE_Stream_Head<ACE_SYNCH_USE>,-1);
>line 344
>ACE_NEW_RETURN (head,ACE_Module<ACE_SYNCH_USE> (ACE_TEXT
>("ACE_Stream_Head"),h1, h2,a,M_DELETE),-1);
>line 351
>ACE_NEW_RETURN (t1,ACE_Stream_Tail<ACE_SYNCH_USE>,-1);
>line 354
>ACE_NEW_RETURN (t2,ACE_Stream_Tail<ACE_SYNCH_USE>,-1);
>line 360
>ACE_NEW_RETURN (tail,ACE_Module<ACE_SYNCH_USE> (ACE_TEXT
>("ACE_Stream_Tail"),t1, t2,a,M_DELETE),-1);
>
>and another problem is reported here:
>
>file Object_Manager.cpp
>Line 788
>ACE_Object_Manager::instance ();
>
>I hope that this information can help.
Yes, it's very helpful. Let's ignore the Object Manager leaks since
they just occur once per program/process and aren't worth trying to
fix. The ACE_Stream leaks are more mysterious, however, since the
call to stream->close() and/or the ACE_Stream destructor should be
deleting the stream head/tail and enclosing module. Would you be able
to try stepping through the debugger to see what is happening here,
i.e., why aren't these objects getting deleted properly?
Thanks!
Doug
--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Vanderbilt University WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203 NET: d.schmidt at vanderbilt.edu
More information about the Ace-users
mailing list