This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I still think that would be considered an outside reference and would not be eligable for garbage collection until after the method completed. Wouldn't the compiler create the new Object with no named reference and then pass it into the method, wait for the method to complete, then you would lose the reference to it?
~Currently preparing for SCJP6
Joined: Dec 16, 2008
I just ran a test and it seems that the argument method can indeed be garbage collected before the method returns: