I think it's a leak in memory
start application Memory ~ 73.972
after change screen to test mesh Memory ~ 74.308
after back to screen to test Eath mesh Memory ~ 73.492
after back to screen to test mesh Memory ~ 73.516
after back to screen to test Eath mesh Memory ~ 73.648
after change screen to test mesh Memory ~ 74.696
after back to screen to test Eath mesh Memory ~ 73.676
test | Eath mesh | mesh
--------------------------------------------
| 73.972 | 74.308
| 73.492 | 73.516
| 73.648 | 74.696
| 73.676 |
There are not leaks: memory is swimming slightly, but on 4-5 iteration of select of the tests remains on the same level. Furthermore, in Delphi I always use ReportMemoryLeaksOnShutdown := true and there memory leaks are not shown. Any way, thank you very much for testing.
I improved a little more:
- was improved mechanism releasing of textures - texture-singleton is released if it is not used already;
- 3d tests were changed - it added reset of the frustum orientation;