public void ProcessRequest(HttpContext context) { GlobalCommon.Logger.WriteLog(LoggerLevel.DEBUG, string.Format("Before {0} Process Request Memory:{1}", context.Request.Url, ComFunc.GetProcessUsedMemory())); _context = context; if (IsWebSocket) { context.AcceptWebSocketRequest(ProcessWebSocket); } else { WP p = Activator.CreateInstance <WP>(); WD d = Activator.CreateInstance <WD>(); try { Init(context, p, d); this.StepStart(p, d); AfterProcess(context, p, d); } catch (Exception ex) { OnError(ex, p, d); } finally { //释放hostjsview //var hjv = (HostJsView)p.ExtentionObj.hostviewengine; //hjv.Release(); p.Dispose(); d.Dispose(); GC.Collect(); } } GlobalCommon.Logger.WriteLog(LoggerLevel.DEBUG, string.Format("After {0} Process Request Memory:{1}", context.Request.Url, ComFunc.GetProcessUsedMemory())); }