views:

53

answers:

1

Hi I have a class whit a nsmutable array instance variable, In my code, I alloc and init my object, and later in my program I release my object, but it cause a "bad access" when I try to release it, why? If i retain my object before release it works, but I don't have other object who point on this object, so I don't need a retain.

Alex

A: 

Assuming you're correct that the array itself is being retained and released the correct number of times (one alloc and one release is correct), the most likely explanation would seem to be that the array contains something that has had release called one more time than necessary.

JosephH