Open YingChen-Lee opened 1 year ago
The map games_ should use shared pointers. It stores the object that is currently in use and is responsible for updates to the database. The memory of the game object should be destroyed, if currently we don't need to manipulate the data.
For now, we use in memory repository. However, we will need to use database as repository.
We need to add new implementation of repository interface. Also, modify the parameter of
GameRepository::SaveGame
andGameRepository::AddGame
to take raw pointer instead of shared_ptr.