Does ASP.Net call Dispose on the Page/Controls in a page, or must I do this?

前端 未结 4 675
小蘑菇
小蘑菇 2020-12-18 21:01

Given that the Control class implements IDisposable, I would think that ASP.Net is at least capable of triggering a Dispose cascade as the Page finishes it\'s life-cycle on

4条回答
  •  清歌不尽
    2020-12-18 21:18

    It's done for you. Look at UnloadRecursive() from System.Web.UI.Control in Reflector, which is called by ProcessRequestCleanup().

提交回复
热议问题