this is for MEF .NET 4.0 (i.e. .net framework 4.0 current patch level)
I am hunting down a memory leak regarding composition containers. I ahve quite a lot of thm forming ahierachy. They have partially scoped content.
The memory leak I am trying to find resolves around them listening to changees of the parent which I seemingly am unable to get rid of.
My profiler shows me my biggest adding is in a half an hour test 22.17 million (!) new nistances of System:Threading.ReaderSWriterCount. I start thinking that with all the hierarchical CompositonContainers being created I am slowly leaking instances of
dynamically created types that never get released.
* When I get a non-shared export from a composition container, is the composition container maintaining a link? Usnig GetExportedValue, do I HAVE to ReleaseExport later?
`* Is there any way to centrally disable the whole recomposition mechanism? We do not use it (modules are identified static when loading), and all the event hookups are overhead, obviously.