objective c - iOS Objec-C error for object pointer being freed was not allocated -



objective c - iOS Objec-C error for object pointer being freed was not allocated -

i'm getting next error in xcode.

error object 0x4e18d00: pointer beingness freed not allocated ** set breakpoint in malloc_error_break debug

i've setup nszombieenabled in target can view call. is

-[___nsarrayi release]

it looks i've released array somewhere else in code , auto release pool trying release when dealloc'd.

how can find out where? idea?

fyi, i'm creating arrays using arraywithcapacity method or similar, never utilize alloc or init methods. don't see, anywhere releasing same arrays. (maybe i'm blind!!)

also, command flow follows: click uibutton, fire function attached onclick. go various logic layers , nsarray back. can iterate array in "onclick button function" , print contents. when "onclick button function" quits above error in "main" method.

another note in 1 function create nsmutablearray want homecoming nsarray utilize [[mutablearray copy] autorelease]. ok, right?

any advice appreciated have great difficulty in trying track cause errors down.

thanks in advance.

i figured out wrong..

in book class had chapters declared nsaray , in default constructor said

chapters = [nsarray array];

i took out of constructor , well. help guys.

p.s. if forget can please mark accepted answer? cheers ;)

objective-c ios nsarray autorelease

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -