That depends on your definition of a level, really. How self-contained are they, and how big?
eg. One extreme would be the Hitman games: massive, extremely detailed levels that have no entry or exit points and each represent a single chapter of the story. It makes sense to free these when you're done, even if the story will come back to the same level later, as it will be several minutes or even hours away (and you can hide the loading behind a cutscene).
On the other hand you might have something like the Elder Scrolls, which is big and detailed but with absolutely no borders and totally free access: for this kind of gameplay to work, you'd need to be caching the level data for the areas around the player as well so that the transition from one to another is totally seamless.
The other extreme might be something like Final Fantasy 7: the "levels" are essentially single screens and very quick to load because they're flat panels. You could reasonably go either way here, as you need quick access but they're also pretty fast.
Basically, it comes down to how long you think it will be before a user wants to come across a transition and how smooth that transition has to be (obviously you'd want it to be seamless in any case, but this isn't always an option) so that the style of gameplay is uninterrupted. If you need seamless gameplay, you should be considering keeping the last level accessed in memory, and possibly some kind of background-loading system so that the next one will be ready as well by the time the player gets there (at which point you could free the level one back as the player is far enough away that you have time to reload it if necessary). If you don't need seamless gameplay, just free everything and reload it again at the start - and come back to this as a potential area for improvement once the majority of the game is done.
|