Moved assert code to check if the resource that a weakreference points to is alive or not after garbage collecting to a separate method. This defeats the fact that in debug mode instances might be kept alive for longer than strictly needed. Disabling inlining defeats any optimizations that might happen in release mode.
The end result is a garbage collection test that works both in debug and release.
Moved assert code to check if the resource that a weakreference points to is alive or not after garbage collecting to a separate method. This defeats the fact that in debug mode instances might be kept alive for longer than strictly needed. Disabling inlining defeats any optimizations that might happen in release mode.
The end result is a garbage collection test that works both in debug and release.