Are resources loaded by ResourceCache stored in memory?

I’m passing references to an image and don’t want to have copies around
And if it is stored in memory, how could I release them?

Resources in urho are reference counted. This means resources which reference count reaches 0 are automatically deleted. When you load a resource in resourcecache it’s reference counter is increased by 1 when you use this resource somewhere in the scene the ref count increases each time you’re refering to the resource. To remove unused resources call

This will remove all resources with ref count of 1 (referenced only in resource cache)


You can also use GetTempResource. This will not store the resource in the cache.