Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-27-2005
timeguest timeguest is offline
Registered User
 
 
Join Date: Oct 2004
Posts: 16
Can I use Ice's smart pointer with my own type?

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?
Reply With Quote
  #2 (permalink)  
Old 06-27-2005
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,534
Yes, you can use IceUtil::Shared for your own types, for example:

Code:
   class Base : public virtual IceUtil::Shared
   {
   };
   typedef IceUtil::Handle<Base> BasePtr;
Benoit.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
smart pointer list crash problem! netfish Help Center 9 11-17-2006 08:24 AM
How to disable Ice's reestablish-connection behavior ? rc_hz Help Center 4 08-31-2006 11:25 AM
member ambiguity error when creating a smart pointer heathbar Help Center 3 04-09-2006 06:32 PM
About the smart pointer. level Help Center 11 08-04-2004 09:16 PM
Puzzle on smart pointer soloman817 Help Center 1 07-13-2004 06:29 PM


All times are GMT -4. The time now is 09:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.