summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Object.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2003-10-20 23:18:23 +0000
committerMichi Henning <michi@zeroc.com>2003-10-20 23:18:23 +0000
commit8941640745d51e543fadc0524368d5f861691152 (patch)
tree384020f2b665d7f1a1c20b5ea435e0bf74faf476 /cpp/src/Ice/Object.cpp
parentmerging changes from garbage collector (diff)
downloadice-8941640745d51e543fadc0524368d5f861691152.tar.bz2
ice-8941640745d51e543fadc0524368d5f861691152.tar.xz
ice-8941640745d51e543fadc0524368d5f861691152.zip
merging changes for garbage collector
Diffstat (limited to 'cpp/src/Ice/Object.cpp')
-rw-r--r--cpp/src/Ice/Object.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp
index 6c06c4f5caa..205ec9a2f29 100644
--- a/cpp/src/Ice/Object.cpp
+++ b/cpp/src/Ice/Object.cpp
@@ -272,6 +272,32 @@ Ice::Object::__read(BasicStream* __is, bool __rid)
}
void
+Ice::Object::__gcReachable(::IceUtil::ObjectMultiSet& c) const
+{
+ ::IceUtil::Mutex::Lock sync(_activeFacetMapMutex);
+
+ for(map<std::string, ObjectPtr>::const_iterator i = _activeFacetMap.begin(); i != _activeFacetMap.end(); ++i)
+ {
+ __addObject(c, i->second.get());
+ }
+}
+
+void
+Ice::Object::__gcClear()
+{
+ ::IceUtil::Mutex::Lock sync(_activeFacetMapMutex);
+
+ for(map<std::string, ObjectPtr>::iterator i = _activeFacetMap.begin(); i != _activeFacetMap.end(); ++i)
+ {
+ if(i->second)
+ {
+ i->second->__decRefUnsafe();
+ i->second.__clearHandleUnsafe();
+ }
+ }
+}
+
+void
Ice::Object::ice_addFacet(const ObjectPtr& facet, const string& name)
{
IceUtil::Mutex::Lock sync(_activeFacetMapMutex);