Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#8 CBPerlArray have inconsistencies in retain/release behavior

closed
nobody
5
2010-11-28
2006-12-01
Anonymous
No

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
berdcf@wanadoo.fr

Discussion

  • Sherm Pendley
    Sherm Pendley
    2007-03-04

    Logged In: YES
    user_id=473550
    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