You can't get rid of objects as such because that's what GC is doing for
you. All the object u are creating in your JSP will follow the same GC rule
as other object created in any method. For beans you can specify the scope
mechanism to control how long you want to keep the reference handle.
I will NEVER suggest you finalize() method to do some 'smart things'. By
overriding finalize(), you are effectively increasing the life of the object
as GC now has to deal with this object at least twice.
Regards,
Chandra Patni
Oracle Corp
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Lenin Lopez
Sent: Wednesday, June 13, 2001 12:51 PM
To: [EMAIL PROTECTED]
Subject: How to get rid of objects ( beans) when the user abandons the
sit e
HI all,
My question is how to get rid of object ( to avoid memory leaks) when the
user 'just' abandons the site
is there any way I can detect when the user leaves the page so I can triger
some kind of event to get rid of my objects?
Please
Help
Thank you all
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets