Here is an example of a piece of code that uses reference counting. Note that the class MyObject is derived from TObject, and just includes reference counting abilities. These are extremely useful. Normally, the string would have been disposed of, but the unexpected jump to the exception handler caused your program to skip the code that would have released to object. With temporary objects this is not a problem.
Temporary objects introduce the idea that objects have a limited lifetime.
Since GUI-driven applications run in a continuous loop, it is quite simple to dispose of all temporary objects at the end of the run loop. This brings us to the concept of Autorelease Pools. Essentially, an Autorelease pool is a container which holds a list of all objects that need to be disposed of at the end of the run loop. When a temporary object is created, it is added to the autorelease pool. The program can then use that object and not worry about disposing of it when it's done with it, because the object will automatically be disposed of.