control memory usage in game project
The game:
In the game a character can have a certain amount of cents. There can be different characters in the game who have different amounts of cents. One cent has a weight of 50 g. I already designed a Weight class to represent a weight. All cents are identical and they do not 'know' by who the are owned (unidirectional association)
The problem:
The total memory needed to handle cents must by constant in every game that is played (i.e. independent of the amount of cents that circulate during the game)
Some people said something about using a static inner class but I didn't quiet understand how that would solve the problem. I also thought of using a int variable 'totalCentAmount' but didn't get their either
Thanks!

