#8 CBPerlArray have inconsistencies in retain/release behavior


In the CBPerlArray implementation:

Objects included when the CBPerlArray is allocated are not retrained, and they are not released or autoreleased at deallocation.
Well this last point is internally consistent with itself but not with the behavior of the NSArray superclass.

But this is not consistent:

Objects added by -addObject: are retained.
Objects added by -insertObject:atIndex: are retained.
Objects replaced by -replaceObjectAtIndex:withObject: are not retained.

I consider CBPerlArray should have a behavior that mimic perfectly the NSArray behavior or the "tollfree bridging" becomes a nightmare.

By the way, did I tell you I really love CamelBones and just can't think of living without it.

Xaviera Barnekova


  • Sherm Pendley

    Sherm Pendley - 2007-03-04

    Logged In: YES
    Originator: NO

    The bug in -replaceObjectAtIndex:withObject: has been fixed; the replacement is now retained correctly.

    I'm not certain what's meant by the first - objects included with CBPerlArray is created? Created from what language, using what method(s)? The +arrayWithObjects: and -initWithObjects: methods are not listed as primitives.

  • Sherm Pendley

    Sherm Pendley - 2010-11-28
    • status: open --> closed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks