I ran your code and if you look at the times to allocate/deallocate classes and records, you are right.
My results are:
Classes: 156
Records: 78
Nevertheless, you normally don't create/destroy alot of classes per second. If you look at Meshes, Textures, Shaders, Fonts, GUI-Elements, etc... You'll see that you don't need to rapidly create and destroy them. Moreover most of the creation/destruction happens when a game starts and exits. So the actual gameplay will not be significantly slower, unless you decide to created/destroy hundreds of objects a second.
However, In some cases it can be wise to use records e.g for particles in a particle system. I agree with you on that point.
I agree with you on that too.anyways i think this thread needs to get back on topic.
Bookmarks