KilnGraphics / Blaze4D

Minecraft but with Vulkan.
GNU Lesser General Public License v3.0
270 stars 12 forks source link

Memory leaks in multiple areas #29

Closed burgerindividual closed 2 years ago

burgerindividual commented 3 years ago

We don't use the contents of GlUniform, so it leaks memory from there. We could just call close on them instead of mixing in, but we'd have to do it at the right time. MinecraftUbo also leaks a lot of memory in the buffer creation. There are more leaks that I haven't listed that can be found by uncommenting the DEBUG_MEMORY_ALLOCATOR line in the Blaze4D class. The memory leaks end up with us either crashing due to running out of device pool memory or running out of stack space on the cpu. For this to run without special arguments, we need to fix these issues.

@OroArmor I think you could probably take care of these considering you know more about uniforms than anyone else working on the project. If you can't, then I'll try to figure them out.

burgerindividual commented 3 years ago

In recent builds this is much more tame. Running with the debug allocator shows that we don't have many major memory leaks until the game is closed, which is covered in a different issue. I'm not going to close this yet because I haven't done extensive testing.