diff options
author | Michi Henning <michi@zeroc.com> | 2004-03-24 05:18:18 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2004-03-24 05:18:18 +0000 |
commit | abc9df1d86f7d351b6257e4bfd435895ac408cb9 (patch) | |
tree | f5a59616ad0b00539d46d8140aa1da4fd1123c2c /cpp/src/IceUtil/GC.cpp | |
parent | Removed reference to Xerces-C. (diff) | |
download | ice-abc9df1d86f7d351b6257e4bfd435895ac408cb9.tar.bz2 ice-abc9df1d86f7d351b6257e4bfd435895ac408cb9.tar.xz ice-abc9df1d86f7d351b6257e4bfd435895ac408cb9.zip |
Added a comment to GCShared to explain why delete is called by __decRef()
outside the protection of the lock.
Also moved the code to update the object set from ~GCShared() to the
garbage collector. That's cleaner than doing it from the destructor.
Diffstat (limited to 'cpp/src/IceUtil/GC.cpp')
-rw-r--r-- | cpp/src/IceUtil/GC.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cpp/src/IceUtil/GC.cpp b/cpp/src/IceUtil/GC.cpp index cd8b23a4298..148a85fb878 100644 --- a/cpp/src/IceUtil/GC.cpp +++ b/cpp/src/IceUtil/GC.cpp @@ -229,6 +229,7 @@ IceUtil::GC::collectGarbage() } for(i = counts.begin(); i != counts.end(); ++i) { + gcObjects.erase(i->first); delete i->first; if(_statsCallback) { |