From this page on wikipedia:
In practice, retain, release and autorelease are straightforward. Some people seem to find it confusing but perhaps they think it’s more complicated than it is. To keep an object you’re given, retain it. Objects you make are already retained. To throw it away and refer to it no more, release it. If you write a factory method, autorelease it. If you are simply making use of an object returned by a factory method for a short while, do nothing.