summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorsma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-07-19 08:45:23 +0000
committersma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-07-19 08:45:23 +0000
commit638ed717607e9980c07a59eaa223318d105c4df6 (patch)
tree839f9c64b420e4c8e253660224cda0ae01070de3 /TAO
parent12d06420c6c28157d8186ab9a53cba045baddeb1 (diff)
downloadATCD-638ed717607e9980c07a59eaa223318d105c4df6.tar.gz
ChangeLogTag: Wed Jul 19 08:45:00 UTC 2006 Simon Massey <sma@prismtech.com>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLog6
-rw-r--r--TAO/utils/nslist/nslist.cpp10
2 files changed, 12 insertions, 4 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 64a32da2560..ef9ffd6bcd4 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,9 @@
+Wed Jul 19 08:45:00 UTC 2006 Simon Massey <sma@prismtech.com>
+
+ * utils/nslist/nslist.cpp:
+
+ Bug fix for over optimizing Boland compiler.
+
Wed Jul 19 08:03:36 UTC 2006 Simon McQueen <sm@prismtech.com>
* tao/CodecFactory/IOP_CodecA.h:
diff --git a/TAO/utils/nslist/nslist.cpp b/TAO/utils/nslist/nslist.cpp
index 3d4f19d2b63..27fa07cfbfe 100644
--- a/TAO/utils/nslist/nslist.cpp
+++ b/TAO/utils/nslist/nslist.cpp
@@ -50,12 +50,13 @@ namespace
public:
static void add (const CosNaming::NamingContext_ptr nc)
{
- pBottom= new NestedNamingContexts( nc );
+ (void) new NestedNamingContexts( nc ); // This is not a leak (see constructor)
}
static void remove ()
{
- delete pBottom;
+ const NestedNamingContexts *const pThisOne= pBottom;
+ delete pThisOne; // i.e. delete pBottom; Attempt to stop over-optimisation by BORLAND
}
static int hasBeenSeen (const CosNaming::NamingContext_ptr nc)
@@ -81,13 +82,14 @@ namespace
*const pNext; // Next highest level
NestedNamingContexts (const CosNaming::NamingContext_ptr nc)
- :pnc(nc), pNext(pBottom)
+ :pnc(nc), pNext(pBottom) // Adds the old list to this!
{
+ this->pBottom= this; // Doesn't leak this (it's the new start)
}
~NestedNamingContexts ()
{
- this->pBottom= this->pNext;
+ this->pBottom= this->pNext; // this node removed from list.
}
// Outlaw copying