code: public void contextDestroyed(ServletContextEvent event) {
          if (ioc() != null) {
              Ioc ioc = ioc();
              if (ioc instanceof NutIoc) {
                  boolean deposed = (Boolean) Mirror.me(ioc).getValue(ioc, "deposed");
                  if (!deposed)
                      ioc.depose();
              }
          }
      }
docs: 容器销毁时,检查Ioc是否已经关闭,没有的话就关闭之.