Ice has a cool smart pointer implementation, with which we needn't care about memory allocation and deallocation any more. My problem is, can I use Ice's smart pointer with my own class which doesn't necessarily inherit from Ice::Object?
|
|
Ice has a cool smart pointer implementation, with which we needn't care about memory allocation and deallocation any more. My problem is, can I use Ice's smart pointer with my own class which doesn't necessarily inherit from Ice::Object?
Yes, you can use IceUtil::Shared for your own types, for example:
Benoit.Code:class Base : public virtual IceUtil::Shared { }; typedef IceUtil::Handle<Base> BasePtr;
There are currently 1 users browsing this thread. (0 members and 1 guests)