When exactly is the servlet destroyed?

I check the Java Servlet tutorial, but am I missing information about when exactly the servlet is destroyed by the server? and what if I want to manually destroy an unused servlet to save memory for other tasks!

Because, since I know that each server has its own limit in memory, and hosting unused servlets is a waste of resources and application quality,

Thank you for clarifying this point, because application performance is one of the most important issues to take care of during development!

+4
source share
4 answers

node , JVM .

.

?

.

, !

Servlet , Servlet - , . Servlet , .

+4

, , , , , .

destroy() , . destroy() , . , , . destroy() , init().

destroy() , , . destroy , . , , .

+1

Servlet , , , , . , , .

. , ( ) - , , .

, , Java, . , , - , , . .

+1

- destroy, , , .

0

All Articles