I'm trying to dig into a memory leak in my MVC web app and one thing i noticed is that my DefaultRegistry for StructureMap had a duplicated a scan...scan.TheCallingAssembly():
public DefaultRegistry()
{
Scan(
scan =>
{
scan.TheCallingAssembly();
scan.WithDefaultConventions();
scan.TheCallingAssembly();
});
}
Would this cause a problem? Could it cause a memory leak? (Please be the problem). I'm publishing the correction tonight, so i'll find out eventually if that fixes the problem or not; but it would be nice to know for certain if duplicate scan methods have any side affects.
Also, is there any significance in the order in which the scan methods appear? Does scan.WithDefaultConventions() need to come last, or first, or does it matter?