# In a resource manager, how do I handle a resource containing other resources?

I have a resource manager, handling the usual resource loading, unloading etc. With resources such an images and meshes, there is no problem. However, what do I do when I have a resource containing other resources? For example, spriteFont contains reference to a sprite and a letter description.

Should that sprite be added to resource manager, or should my spriteFont be the only owner of that resource?

• What can be the problem if you add SpriteFont too? "my spriteFont must be the only owner of that resource" what do you mean by owner? Sep 20, 2012 at 6:30
• Owner means nobody references to that sprite even resource manager, nobody knows about it's existence. It' helps reduce reference between classes, SpriteFont does not require resource manager Sep 20, 2012 at 8:42