When transitioning to a new level the game would crash.
The cause is that the texture manager holds rptrs to CTexture objects,
But the memory where the CTexture objects are stored is invalidated before reset() is called on the texture manager, leaving those rptrs dangling. When reset() is finally called and the rptrs are destructed in the texture manager, this causes memory access violations.
To resolve this problem, a texture manager reset is performed before invalidating the load heap where the CTexture objects are stored.
When transitioning to a new level the game would crash. The cause is that the texture manager holds
rptrs
toCTexture
objects, But the memory where theCTexture
objects are stored is invalidated beforereset()
is called on the texture manager, leaving thoserptrs
dangling. Whenreset()
is finally called and therptrs
are destructed in the texture manager, this causes memory access violations. To resolve this problem, a texture manager reset is performed before invalidating the load heap where theCTexture
objects are stored.