Archived
This forum has been archived. Please start a new discussion on GitHub.
Base Class For Ref-Counted Classes?
Hi,
Is there a base class that I can inherit from (C++) which will provide the necessary stuff to use IceUtil::Handle (incRef, decRef, the ref count itself and such) , or should I just create a dummy slice object and inherit from that?
Thanks,
Is there a base class that I can inherit from (C++) which will provide the necessary stuff to use IceUtil::Handle (incRef, decRef, the ref count itself and such) , or should I just create a dummy slice object and inherit from that?
Thanks,
0
Comments
-
Forget It
Sorry,
I posted too soon. I see in the header file it lists:
IceUtil::GCShared, IceUtil::Shared, or IceUtil::SimpleShared
as potential base classes.
Thanks,0 -
You should use IceUtil::Shared. IceUtil::SimpleShared is not thread safe. IceUtil::GCShared is for our garbage collector, which only works together with our generated code.0