Thanks for the answers!
But in the event that we reaches zero do not necessarily mean that the resource is destroyed. It fill only be free'd if the memory is needed.
Yes, I have a strategy to specify whether unused resources should be kept in memory (which is the default behavior).
The manager 'owns' the resources and won't destroy them unless DestroyResource is called with its handle and no other copies are in use.
How do you check whether other resources are in use? With reference counting?
I don't allow releasing resources that are in use, as this will lead to a runtime error. The latter is the way to go in my opinion.
Yes, I tend to do it like this. Most often, releasing unused resources isn't meaningful. It might just prevent leaks if a reference is held although unused, but that's rather a logic error.
But since you use raw pointers, I'd also like to ask you how you know whether a resource is still in use?
Resources all inherit from a base Resource class and some rtti magic is done to ensure they are used in the correct circumstances
What do you mean with "correct circumstances"? And the inheritance prevents you from using SFML resources like sf::Image directly, doesn't it? One of my goals is to put very few requirements on the resource classes, the managing is completely non-intrusive.