Closed Zayik closed 5 months ago
In the /src folder there is a changes.txt file. It has been abandoned after the release of v4.0.0, in favor of simply tracking changes in the Github release notes. That changes.txt contains information of v2.0.0 (information that isn't available elsewhere because Simple Injector was still on Codeplex back than, but that website no longer exists). The change list for v2.0 notes that a bug concerning a memory leak in decorators was fixed. This might be a starting point for you.
So perhaps you can find the bug fix in source control (as all former Codeplex commits were ported to the Github git repo). You can cherriepick this change in your custom branch that you took from the latest v1.x release. You can build your own Simple Injector version based on this. Note that you won't be able to sign the assembly, but that should typically not be an issue.
I hope this helps.
Problem: SimpleInjector 1.6 contains memory leak when using decorators. I'm stuck on legacy tools/hardware from both internal use, and 3rd party that cannot be upgraded to newer .net. Container is instantiated periodically based on user configurations. Programs have typical lifespans of weeks, thus causing memory leaks that get noticeably large (upwards of 4GB seen).
Example code that causes memory leak: container.Register<IAnimal, Dog>(); container.RegisterDecorator(typeof(IAnimal), typeof(AnimalHandler)); container.GetInstance().Speak();
Goal: Version of SimpleInjector that supports .net 3.5 and eliminates the decorator memory leak.
Questions: What is the recommended route to achieve this?
Thoughts:
Any help/suggestions would be greatly appreciated.