This content has been marked as final.
Show 1 reply
-
1. Re: destroy() vs. finalize()
walterjwhite Nov 23, 2009 6:52 PM (in response to sherkan777)I think destroy is a different lifecycle event where the bean is destroyed by the container explicitly at the end of a context. It however, may still live in the heap where finalize would then be called by the JVM at garbage collection.
It depends on what you do, I use destroy more often than finalize. It would be the same pattern as using finally in your try-catch blocks.
Walter