If I release mainPath in following example the program gives an error (because I’m releasing an object with zero counter) 

```
NSString  *mainPath = [NSString stringWithFormat:@"%@/Documents/downloadFile.plist",NSHomeDirectory()];
NSLog(@"address is = %@",mainPath);
[mainPath release]; //Program failed here

```

But the following code works fine. 

```
NSString *aa=@"hiiiii";
[aa release];

```

Can anyone explain this? 

Actually I’m not clear about the pointer concept (give a suitable link to clear it)