PerRequestInfo pri = getPerRequest();
  public void endRequest() {    assertIsStarted();    GlobalBeanAccessor.endRequest();    PerRequestInfo pri = getPerRequest();    for (int i = 0; i < pri.todestroy.size(); ++i) {      String todestroyname = pri.todestroy.stringAt(i);      RSACBeanInfo destroybean = (RSACBeanInfo) rbimap.get(todestroyname);      Object todestroy = null;      try {        todestroy = getBean(pri, todestroyname, false);        reflectivecache.invokeMethod(todestroy, destroybean.destroymethod);      }      // must try to destroy as many beans as possible, cannot propagate      // exception in a finally block in any case.      catch (Exception e) {        Logger.log.error("Error destroying bean " + todestroy + " with name "            + todestroyname, e);      }    }    // System.out.println(pri.cbeans + " beans were created");    // Give the garbage collector a head start    pri.clear();  }