|
CheatSheet
Frequently and Not-yet-asked Questions.
FeaturesHow is Property Injection done on reflection-created components? How are circular dependencies handled? Where is InstanceScope.Thread? How can I retrieve more than one component for the same service? APIWhat is the difference between Activating/OnActivating and Activated/OnActivated? How do I provide parameters to Resolve()? Why, oh why, is Singleton the default scope? IntegrationHow do I integrate Autofac into my app? Can Autofac cause memory leaks?SingletonsAutofac uses strong reference to hold onto singleton components. This objects will exist at least for as long as Autofac container exists. Factory scopedFactory scoped components that are owned by the container are held using weak references, so that they can be disposed at the appropriate time or earlier in the case that they can be garbage-collected. Factory scoped components with external ownership are not referenced by Autofac at all - the reference returned from Resolve() will be the only reference at that point. Autofac should never cause memory leaks. For more information on tracking down leaks in .NET see Memory Leak Detection in .Net article DeploymentI'm bored, what else can I read?Check out BestPractices and OnTheWeb for some more Autofac reading. |
Sign in to add a comment