Memory leak, virtual memory, and other matters of grave concern
I'm writing a simple 2d strategy game in space.
As in any startegy game I have databases for:
Entities (units), each containing a pointer to an engine (everything about it's movement) and a gun (every thing about it's combat capabilities)
Trail marks (that ships leave when flying around space, simmilar to homeworld)
Bullets (what ships fire at each other at high speed)
Motherships (one per player)
and explosions (that occur when something gets destroyed)
All of these are implemented using full OOP, each is an instance of a class and they are all goathered in different dynamic lists...
everything works well, I remember to deallocate everything as soon as it is no longer needed...
I use SDL
My question: why, after leaving the game running and about 50-60 harvesting units collecting resources around the map, do i get a message from windows saying virtual memory had been enlarged to fit my program's needs?
Maybe each instance of each class is too large in memory? maybe I should limit my game to less units? how do other games like warcraft can include much better grpahics and bigger databases without using the hard drive based virtual memory?
how can i make sure for suuuuuure that there is no memory leak involved?! HELP
all bullets,explosions, trail marks and so on that get to a certain age, expire - meaning - i delete them successfully from the databases... what's going on?!