vblanco20-1 / vulkan-guide

Introductory guide to vulkan.
https://vkguide.dev/
MIT License
940 stars 213 forks source link

Memory leak #71

Closed dontweaks closed 2 years ago

dontweaks commented 2 years ago

Hi, branch: engine

I commented this code:

ZoneScopedNC("Flag Objects", tracy::Color::Blue);
//test flagging some objects for changes

//int N_changes = 1000;
//for (int i = 0; i < N_changes; i++)
//{
//  int rng = rand() % _renderScene.renderables.size();
//
//  Handle<RenderObject> h;
//  h.handle = rng;
//  _renderScene.update_object(h);
//}

and when I run the app, after like 3 minutes the memory grows to ~3GB

vblanco20-1 commented 2 years ago

If you have Tracy enabled but dont connect it, it can create very considerable memory leaking from the profiling traces being stored. Try to disable Tracy (removing the TRACY_ENABLE definitions) and see if it still happens.

dontweaks commented 2 years ago

Yep, removing TRACY_ENABLE definition fixed the memory leak.