summaryrefslogtreecommitdiff
path: root/cpp/include/Ice/Object.h
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2009-12-09 15:12:12 +1000
committerMichi Henning <michi@zeroc.com>2009-12-09 15:12:12 +1000
commitd0d27bb7cf7b5ff8f9f3028f63f650f1d0b01678 (patch)
tree9524523d712bca42f6bd36fabd72c76371ecdca8 /cpp/include/Ice/Object.h
parentMerge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff)
parentfix for cpp/test/Ice/Makefile.mak (diff)
downloadice-d0d27bb7cf7b5ff8f9f3028f63f650f1d0b01678.tar.bz2
ice-d0d27bb7cf7b5ff8f9f3028f63f650f1d0b01678.tar.xz
ice-d0d27bb7cf7b5ff8f9f3028f63f650f1d0b01678.zip
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
Diffstat (limited to 'cpp/include/Ice/Object.h')
-rw-r--r--cpp/include/Ice/Object.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/cpp/include/Ice/Object.h b/cpp/include/Ice/Object.h
index 325ffa35ba3..ca0886b85e1 100644
--- a/cpp/include/Ice/Object.h
+++ b/cpp/include/Ice/Object.h
@@ -58,16 +58,7 @@ public:
virtual const Current& getCurrent() = 0;
};
-//
-// We should not need virtual inheritance here since Object is the only class
-// that derives from GCShared. However, Visual C++ seems to generate bad code
-// without 'virtual'. This needs to be investigated further.
-//
-#ifdef _MSC_VER
-class ICE_API Object : public virtual IceInternal::GCShared
-#else
-class ICE_API Object : public IceInternal::GCShared
-#endif
+class ICE_API Object : virtual public IceUtil::Shared
{
public:
@@ -113,8 +104,14 @@ public:
virtual void __write(const OutputStreamPtr&) const;
virtual void __read(const InputStreamPtr&, bool);
- virtual void __gcReachable(IceInternal::GCCountMap&) const {}
- virtual void __gcClear() {}
+ // Virtual methods to support garbage collection of Slice class instances. These
+ // methods are overriden by Slice classes which can have cycles.
+ virtual void __addObject(IceInternal::GCCountMap&) {}
+ virtual bool __usesClasses() { return false; }
+ void __decRefUnsafe()
+ {
+ --_ref;
+ }
protected: