diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-02-22 17:00:38 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-02-22 17:00:38 +0000 |
commit | 152da9cd550e9fc21f1d1264bd6b60b081ec17fc (patch) | |
tree | 9467e67a75751c1e76e02c1d463bcc38671b7680 | |
parent | f0bf9c81fe9258869b15d7ba06453252ac64665d (diff) | |
download | ATCD-152da9cd550e9fc21f1d1264bd6b60b081ec17fc.tar.gz |
*** empty log message ***
-rw-r--r-- | ChangeLog-97a | 7 | ||||
-rw-r--r-- | ace/Module.h | 6 | ||||
-rw-r--r-- | ace/Stream.cpp | 7 |
3 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog-97a b/ChangeLog-97a index 7e9e82f0626..1e7a8b973d9 100644 --- a/ChangeLog-97a +++ b/ChangeLog-97a @@ -1,3 +1,10 @@ +Sat Feb 22 10:57:47 1997 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * ace/Stream.cpp (open): Make sure that if we allocate the Tasks + in the Stream head and the Stream tail that we set the M_DELETE + flag so that the close() method will clean up the memory. + Thanks to David Levine and Purify for noticing this problem. + Fri Feb 21 08:06:41 1997 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> * ace/OS.i: Yikes, it looks like the Solaris and the POSIX version diff --git a/ace/Module.h b/ace/Module.h index d2bd2c608f0..6370b6478c9 100644 --- a/ace/Module.h +++ b/ace/Module.h @@ -38,13 +38,13 @@ public: enum { M_DELETE_NONE = 0, - // Indicates that close() should not delete any tasks. + // Indicates that close() should not delete any Tasks. M_DELETE_READER = 1, - // Indicates that close() should delete the writer thread. + // Indicates that close() should delete the writer Task. M_DELETE_WRITER = 2, - // Indicates that close() should delete the reader thread. + // Indicates that close() should delete the reader Task. M_DELETE = 3 // Indicates that close() deletes the Tasks. Don't change this diff --git a/ace/Stream.cpp b/ace/Stream.cpp index 92b8e423bca..cb58abe60d7 100644 --- a/ace/Stream.cpp +++ b/ace/Stream.cpp @@ -263,7 +263,9 @@ ACE_Stream<ACE_SYNCH_2>::open (void *a, { h1 = new ACE_Stream_Head<ACE_SYNCH_2>; h2 = new ACE_Stream_Head<ACE_SYNCH_2>; - head = new ACE_Module<ACE_SYNCH_2> ("ACE_Stream_Head", h1, h2, a); + head = new ACE_Module<ACE_SYNCH_2> ("ACE_Stream_Head", + h1, h2, + a | M_DELETE); } if (tail == 0) @@ -271,7 +273,8 @@ ACE_Stream<ACE_SYNCH_2>::open (void *a, t1 = new ACE_Stream_Tail<ACE_SYNCH_2>; t2 = new ACE_Stream_Tail<ACE_SYNCH_2>; tail = new ACE_Module<ACE_SYNCH_2> ("ACE_Stream_Tail", - t1, t2, a); + t1, t2, + a | M_DELETE); } // Make sure *all* the allocation succeeded! |