what happens if we wont use destroy()?

Answer Posted / rv.nandakishore

Think, if there is 100's of objects are utilizing the
resource(i.e Connection object). That means allocation of
those objects are stored in the internal memory of the JVM
right... If similar requests are utilizing the Connection
object.... at one time the JVM utilization memory is full...
this will degrade the application. For this reason we call
explicitly destroy()...... if not the Garbage Collector will
taken care to reclaim the memory.... by we don's say when it
will be reclaim the memory and free the JVM memory......

Is This Answer Correct ?    20 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between Servlet Request and Servlet Context when calling a Request Dispatcher?

605


What is the need of session tracking in web application?

585


Can you use javascript in servlets?

604


What is servlet and list its types?

546


How do you invoke a servelt?

630






why we should override only no-agrs init() method.

680


What mechanisms are used by a Servlet Container to maintain session information?

672


What is a web container and what is its responsibility?

531


How do we translate jsp?

578


What is servlet and its advantages?

527


What is the type of method for sending request from http server?

598


How do we call one servlet from another servlet?

592


How can we upload the file to the server using servlet?

546


What are the phases of a servlet life cycle?

622


Explain url encoding in servlet?

582