Is unhooking event handlers needed in ASP.NET to prevent memory leaks? -


coming winforms/wpf i've learned hard way not remembering unhook event handlers can lead memory leaks.

does apply webapps too? seems when request ends, (non-static) should eligible garbage collection. true?

i remember jumping through sorts of hoops ensure events got unhooked when object goes out of scope, multi-threading going on ensure responsive ui. of still in webapp or 1 of luxuries of working (mostly) restful model?

i don't think need worry unhooking events. correct non-static gets queued garbage collection. main thing worry cleaning unmanaged code. make sure wrap implementing idisposable in using{} block (or manually call dispose() on it).


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -