diff options
author | cbeaulac <cbeaulac@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-05-04 15:15:38 +0000 |
---|---|---|
committer | cbeaulac <cbeaulac@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-05-04 15:15:38 +0000 |
commit | 0c3d7d489ff19e13c4f5e3d82e0ac00ab0b61202 (patch) | |
tree | 8cdf88d537fb981116aa4251c8e76eecc427e695 /ACE/ace/Stream.cpp | |
parent | 1c9566997efef1c0c62f8705bd4d21638eb20e00 (diff) | |
download | ATCD-0c3d7d489ff19e13c4f5e3d82e0ac00ab0b61202.tar.gz |
Wed May 4 15:07:46 UTC 2011 Chad Beaulac <chad.beaulac@objectivesolutions.com>
* ace/Stream.cpp:
Modified ACE_Stream::remove(name,flags) so close is always called
on the module that's removed regardless of the flags. Close needs
to be called to ensure proper lifecycle management when the
ACE_Service_Repository shuts down in its fini method.
Bugzilla #3912
* tests/Bug_3912_Regression_Test.conf:
* tests/Bug_3912_Regression_Test.cpp:
* tests/run_test.lst
* tests/test.mpc
Added test to assert that close is called.
Diffstat (limited to 'ACE/ace/Stream.cpp')
-rw-r--r-- | ACE/ace/Stream.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ACE/ace/Stream.cpp b/ACE/ace/Stream.cpp index 1346e0dda20..74185923911 100644 --- a/ACE/ace/Stream.cpp +++ b/ACE/ace/Stream.cpp @@ -260,12 +260,12 @@ ACE_Stream<ACE_SYNCH_USE>::remove (const ACE_TCHAR *name, else prev->link (mod->next ()); + // Close down the module. + mod->close (flags); + // Don't delete the Module unless the flags request this. if (flags != ACE_Module<ACE_SYNCH_USE>::M_DELETE_NONE) { - // Close down the module. - mod->close (flags); - // Release the memory. delete mod; } |