Original Post
So I have a project that I'm toying with really and I've hit a major problem. The project is a hacking sim game using winforms. I have my program generate a massive amount of data about virtual people and computers and then I save the data to a file using binary serialization so that the player can play again later. If I set the program to create 50k people, it uses about 250MB of ram. When i go to load the 77MB save file, the amount of memory required to load the data explodes to 1.38GB. Also the program doesn't dispose of any memory after the loading is done. What could be causing the ballooning of memory usage? I've got rudimentary logging in place and to my knowledge there is no data duplication or anything like that occurrin. I'm really stumped.
Edit: I suppose I should note that I am a bit of a newb when it comes to serialization. Also of note is that I have a single game class that I serialize to a file. This Class contains several lists that cross reference each other. I am under the impression that the .net binary formatter handles this appropriately, am I wrong?
Edit: I suppose I should note that I am a bit of a newb when it comes to serialization. Also of note is that I have a single game class that I serialize to a file. This Class contains several lists that cross reference each other. I am under the impression that the .net binary formatter handles this appropriately, am I wrong?