I have a WCF service class that is requested periodically from UI data it should retrieve.
In the service class I import usually shared parts (they are used by other WCF services and expensive to create)
On the WCF service class, in it's constructor we do on the application unique catalog we have Container.ComposeParts(instanceOftheWCFService)
The thing is, the service class instance constructor gets called periodically/makes calls to Container.ComposeParts periodically.
We are using MEF from .NET framework 4 and when I dump process memory I see all the instances of the WCF service class laying around, "leaking".
Qustion: When one does ComposeParts could MEF hold on to the instance created that imports shared parts. The class itself (WCF service) does not have any attributes from MEF, so MEF should not hold any references to it...
In the service class I import usually shared parts (they are used by other WCF services and expensive to create)
On the WCF service class, in it's constructor we do on the application unique catalog we have Container.ComposeParts(instanceOftheWCFService)
The thing is, the service class instance constructor gets called periodically/makes calls to Container.ComposeParts periodically.
We are using MEF from .NET framework 4 and when I dump process memory I see all the instances of the WCF service class laying around, "leaking".
Qustion: When one does ComposeParts could MEF hold on to the instance created that imports shared parts. The class itself (WCF service) does not have any attributes from MEF, so MEF should not hold any references to it...