I opened up task manager the other day and found that my game is leaking quite a lot of memory, about 100KB per second.
I only time I allocate memory is when the program starts up and when assets are loaded.
I used #define to also output to the console on allocation just to make sure and I'm using STB libraries so I did the same for those to make sure the allocations weren't coming from them. I can now see that once the assets are loaded no more allocations are done and yet the leaking still occurs.
Is there anything else that could be causing this? I'm all out of ideas.
Are you looking at what the game is using or what it has gotten allocated.
In windows 10 I can't even find what the game has gotten allocated in the task manager so it just shows what has been used which would look like a memory leak until you hit the allocated sum of your allocated memory.
There are a few columns regarding memory in Task Manager.
The default one shown is the Private Working Set -- this is the memory the process is using that cannot be shared. In other words, it's the memory you've actually accessed; for another process to get that memory the OS has to page out your memory.
If you're looking solely at allocations, use the Commit Size. That's the amount of memory you've allocated and committed. The size of your address space, basically. The OS has to ensure you can access that memory when needed, but not all of it is actually allocated to physical memory -- it will page fault in when you first access it.