AdamsLair / duality

a 2D Game Development Framework
https://adamslair.github.io/duality
MIT License
1.4k stars 289 forks source link

#719 Fixed vertex locking test failing in debug mode #768

Closed Barsonax closed 4 years ago

Barsonax commented 4 years ago

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.