EXEC_BAD_ACCESS when releasing a copied object <p>This has been killing me.. Because its a memory management issue...</p> <p>I have a NSArray created like so in say Class 2</p> <pre><code>@property (nonatomic, copy) NSArray * sourceArray; </code></pre> <p>I set this array from another class say Class 1 like ...</p> <pre><code>Class2 = [[Class2 alloc] initWithFrame:self.bounds]; [Class2 setSourceArray:self.namesArray]; </code></pre> <p>Where I am sure that self.namesArray contains objects.</p> <p>When I release Class 1, it releases Class 2 since Class 2 is a subview in Class 1 which is expected, but I get an EXEC_BAD_ACCESS when Class 2 releases sourceArray in dealloc like so...</p> <pre><code>[sourceArray release]; </code></pre> <p>I DO NOT get this error if I do not release namesArray in Class 1.. Which doesn't make sense because I am using I declared sourceArray as COPY which to my knowledge gives Class 2 its own version of the array...</p> <p>Can anyone help me here? Its killing me!</p> <p>More info: The reference count right before I try to release sourcearray is 1... So Why would a release not work?!</p>