Results 1 to 3 of 3

Thread: Who's Counting? Sample code errors?

  1. #1
    blair is offline Registered User
    Name: Blair Zajac
    Organization: Sony Pictures Imageworks
    Project: VnP
    Join Date
    Mar 2007
    Posts
    34

    Who's Counting? Sample code errors?

    Reading the new Connections article Who's Counting?, there appears to
    be some coding errors in the IceInternal::Handle class on page 12.

    The method

    Handle& operator=(const Handle& h)

    never calls __incRef() on h->_p, instead it calls __incRef() on _p and
    then __decRef() on the original _p (now named ptr).

    and

    Handle& operator=(T* p)

    refers to the h variable, which is not in scope in this method.

    Regards,
    Blair

  2. #2
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    Urgh, blush--cut and paste error...

    Thanks for letting me know, I'll fix this ASAP!

    Cheers,

    Michi.

  3. #3
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    We've put an updated version on our web server. Thanks for letting us know about the bug!

    Cheers,

    Michi.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Application Shutdown & Ref Counting Classes
    By acbell in forum Help Center
    Replies: 3
    Last Post: 12-05-2006, 12:01 PM
  2. Unknow exception in "Printer" sample code
    By wangh705 in forum Help Center
    Replies: 6
    Last Post: 10-26-2006, 12:01 PM
  3. Sample codes.
    By OrNot in forum Help Center
    Replies: 1
    Last Post: 08-04-2005, 06:45 AM
  4. Some errors?
    By OrNot in forum Help Center
    Replies: 6
    Last Post: 07-21-2005, 09:38 AM
  5. AMD Sample
    By enzo in forum Help Center
    Replies: 5
    Last Post: 12-08-2004, 09:11 AM

Posting Permissions

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