Unload a level in C++

So I've just gotten started in CryEngine and while I'm fairly experienced in C++ this API (while intuitive) is foreign to me.

To get a handle on things I started with a flappybird clone and it's working fairly well but I noticed that when I reload the level upon the bird's death the engine's ram usages goes up 0.1 GB- it doesn't go back down. Does the engine not automatically unload levels? Is this a memory leak I failed to deal with? (I am not allocating memory- except for a vector that definitely isn't 100 MB long and it definitely should be having it's destructor called)

If it doesn't unload them how do I tell it to unload them?

BTW I'm just issuing a console command, "map [level_name]"

Thanks for your time! :)

Re: Unload a level in C++

I think you posted this also on Reddit - but from the sounds of it there is some manual memory allocation that isn't being properly cleaned up or managed. CryEngine manages memory in regards to entities, entity cleanup and its own environment - but anything custom you add on top of this or outside of the existing systems will need to be memory managed by you.

If you have any code snippets you'd like to share to take a look at please do. Thanks!

Who is online

Users browsing this forum: No registered users and 2 guests