public virtual void Unload()
{
lock (this)
{
templates.Clear();
dictionaries.Clear();
foreach (var import in _imports)
import.Unload();
foreach (var import in _importsToClearOnUnload)
_imports.Remove(import);
_importsToClearOnUnload.Clear();
}
}