From: Finn B. <bc...@us...> - 2001-02-14 22:30:26
|
Update of /cvsroot/jython/jython/org/python/util In directory usw-pr-cvs1:/tmp/cvs-serv13236 Modified Files: PyServlet.java Log Message: Added destroyCache(). Called on reset and PyServlet destroy. Index: PyServlet.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/util/PyServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** PyServlet.java 2001/02/14 09:17:21 1.5 --- PyServlet.java 2001/02/14 22:31:05 1.6 *************** *** 126,129 **** --- 126,130 ---- public void reset() { + destroyCache(); interp = new PythonInterpreter(null, new PySystemState()); cache.clear(); *************** *** 189,192 **** --- 190,206 ---- return servlet; } + + public void destroy() { + destroyCache(); + } + + + private void destroyCache() { + for (Enumeration e = cache.elements(); e.hasMoreElements(); ) { + CacheEntry entry = (CacheEntry) e.nextElement(); + entry.servlet.destroy(); + } + } + } |