Question: I have a complex App that runs reliably, but I'm puzzled why I need to retain a particular NSArray ('sources') *twice* to prevent a crash (although no exception is reported on the console, but the application crashes and returns to the springboard).

A snippet of the code is included below. There's too much code to paste it all, but you have my word that there are no explicit calls to release the array. 'sources' is an instance variable.

If I only retain the array once (or not at all), I get the crash. With two retains, the App is perfectly stable.

```
NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"Sources" ofType:@"plist"];

sources  = [[NSArray arrayWithContentsOfFile:plistPath] autorelease];

[sources retain];
[sources retain];

```

Thoughts on why I would need to retain this array *twice* appreciated. Thanks in advance.

Answer: 
There *is* an explicit call to release the array. `autorelease` is just as explicit as `release` — it just happens later. Not only that, but it was wrong to autorelease the array in the first place, since you didn't own it. One `retain` is necessary to claim ownership of the array. The second one prevents the crash by balancing out the incorrect use of `autorelease`.
```
NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"Sources" ofType:@"plist"];

sources  = [[NSArray alloc] initWithContentsOfFile:plistPath];

```