I want to create an object in Objective C but I don\'t hold a reference to it.
Is it allowed to let the object control its own lifetime by calling [self release]?>
To quote the great philosopher Alicia Silverstone, "I had an overwhelming sense of ickiness" when I read that. But I couldn't really tell you why.
I think I would use autorelease
rather than a simple release
since you're still executing code in self
when you call it, but other than that I can't think of any technical reasons why it wouldn't work.