In my game with on level with many objects memory was increasing pretty fast and fps starts lowering at some point even if nothing happens.
In example with single light in release mode memory usage increased for me from 150 to 300 for 5 mins,
With more lights and more fps (vsync off and maybe release mode as well) this happens much faster - around 10 Mb per seconds.
#include "UltraEngine.h"
using namespace UltraEngine;
int main(int argc, const char* argv[]) {
auto displays = GetDisplays();
auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR);
auto framebuffer = CreateFramebuffer(window);
auto world = CreateWorld();
world->RecordStats(true);
auto camera = CreateCamera(world);
camera->SetClearColor(0.125);
camera->SetFov(70);
camera->Move(0, 2, -8);
auto ground = CreateBox(world, 20, 1, 20);
ground->SetPosition(0, -0.5, 0);
ground->SetColor(0, 1, 0);
vector<shared_ptr<PointLight>> lights;
for (int i = -10; i < 10; i++) {
auto light = CreatePointLight(world);
lights.push_back(light);
light->SetPosition(i, 0, 0);
}
//Main loop
while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false) {
world->Update();
world->Render(framebuffer, false);
window->SetText("FPS: " + String(world->renderstats.framerate) + " RAM: " +
WString(GetMemoryUsage() / 1024));
}
return 0;
}