Results 1 to 3 of 3

Thread: Base Class For Ref-Counted Classes?

  1. #1
    acbell is offline Registered User
    Name: Andrew Bell
    Organization: Iowa State University
    Project: National Resources Inventory
    Join Date
    Jan 2005
    Location
    Ames, IA, USA
    Posts
    89

    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,

  2. #2
    acbell is offline Registered User
    Name: Andrew Bell
    Organization: Iowa State University
    Project: National Resources Inventory
    Join Date
    Jan 2005
    Location
    Ames, IA, USA
    Posts
    89

    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,

  3. #3
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. C# ref parameter
    By slide_o_mix in forum Help Center
    Replies: 2
    Last Post: 01-29-2010, 10:56 AM
  2. Replies: 4
    Last Post: 10-16-2009, 06:51 PM
  3. Replies: 8
    Last Post: 10-23-2008, 05:55 PM
  4. Application Shutdown & Ref Counting Classes
    By acbell in forum Help Center
    Replies: 3
    Last Post: 12-05-2006, 12:01 PM
  5. Replies: 2
    Last Post: 01-24-2004, 09:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •