In my project, I have strange bug in my unit tests, which happens only when I use .NET 4.5, but not when 4.0. Here is source code of my project. Here is compiled binaries.
Steps to reproduce:
- Download source code and compiled binaries
- Place unzipped Binary folder in Interop\Main\ folder.
- Run Interop.Core.Tests.NETFX45 unit tests
Test IsAliveAfterCollectionWork must fail. If you attach memory profiler (I use free dotMemory 4.0 EAP with settings Profile .NET process -> Collection every N-th object: 1, Memory traffic: Collect and Use profiler API), you will see, that array MarkedObject[] has not been collected, although nothing has no references to it.
My configuraton:
- Windows 8.1
- .NET Framework 4.5.1
- I use Visual Studio 2012, but 2010 and 2013 installed too