Does all SPWeb or SPSite instances automatically disposed when console app process has ended?
- by Janis Veinbergs
We have Best practices on using disposable object in SharePoint.
But i`m thinking - can I skip these when using Console Application? That's some code I want to execute once and after that process has finished. Do or don't SPSite and SPWeb's remain opened somwhere?
Why i`m asking this? I just don't want to stress when using something like
var lists =
from web in site.AllWebs.Cast<SPWeb>()
where web is meeting workspace && list is task list
select list
then do some stuff on lists
etc.
Some serious resource leak there because webs get opened, filtered and NOT closed.
So should I worry in console app?