Custom Content(Manager|Register)

Sep 1, 2010 at 6:03 PM

Hi,

I'm interested in your opinions (especially the opinion from StatusUnknown :) ) about a custom ContentManager class which supports "dynamic unloading" of resources. At first glance the only code to add is some reference counting for individual resources. I'm not quiet satisfied with the "level concept" together with unloading a whole ContentManager as described in the tutorials and discussions. Although I'm not developing an actual game right now I'm curious what an experienced developer thinks about it :)

Coordinator
Sep 4, 2010 at 9:32 PM

Hi. Sorry about my slow reply

Unfortunately, this is an internal XNA limitation. The content manager class (which is the low level XNA class that is used to load content) cannot be setup to unload single peices of content (unless that content can be explicitly disposed - which is NOT recommended). In the end, you have to manage your content in groups that can be unloaded together.

Although to be fair, you'd need to work pretty hard to get to the point where you run out of memory, even on the xbox :-)