Just think about it: what's the difference where the object is created? Method is method, no matter of what class. Think, just use some logic.
[EDIT]
You need to understand that two memory objects are involved: a reference itself and a referenced object. If the object becomes
unreachable, it will be eventually garbage-collected:
http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29[
^]
In your case, you won't be able to use the project you have created: you create it and forget the reference when the method is returned. So, it makes no practical sense.
—SA