Sitefinity Context Management explained (from the experts)

December 17, 2012
This is too good of a google+ thread to not share LINK

If you don't want to read through, here's quick summary:

Do not wrap your managers in using statements

using(DynamicModuleManager manager = DynamicModuleManager.GetManager()){
   //Code
}

Why?  

Everytime you get a manager, sitefinity stores it for the duration of your http request.  If you dispose it in a using statement it'll be disposed when that statement completes so the next control\widget that tries to use the manager will have to create a new instance of it (instead of just using the existing shared one).  

Think of it like a bucket full of managers


Image Description

Steve McNiven-Scott

Best\Only Blogger on this site. Therefore defacto blogger of the year Award Winner.