spring - JSR-250 lifecycle annotations: Annotation Type PreDestroy -


is method @predestroy of prototype bean called when bean garbage collected ?

no, not called when bean garbage collected bean garbage collected has dereferenced first, mean have destroyed , @predestroy called.

so method won't called directly has have been called before being garbage collected


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

python - Error: Unresolved reference 'selenium' What is the reason? -

php - Need to store a large amount of data in session with CI 3 but on storing large data in session it is itself destorying automatically -