In your code example, the caller will need to call "release" or "autorelease" on the object pointer. Otherwise it will never be cleaned up - memory leak!
Objective-C has specific patterns for memory management. Apple calls it "semi-automatic" memory management.
First, you could code the method to return the object after calling "autorelease" on it. Then it will be valid in the caller, and it will be cleaned up automatically in the next pass through the event loop. If the caller wants to keep it around, they call "retain" on it and keep a pointer to the object around.
Or just return the object. Then the caller is responsible for eventually calling "release" or "autorelease" on the object to make sure it is cleaned up. Document this fact if your method is part of an API that others use!
Also, if you want to cache the object in your method, you can "retain" it and return it to the caller. Because you've incremented the reference count by calling "retain", it will not be deleted if the caller invokes "release" or "autorelease" on it.
In summary, Objective-C requires more thinking and planning than Java for memory management. At least it isn't C or C++! Using the common patterns above will help you avoid memory leaks.