xamarin/urho

Textures get deleted unintendedly

Haukinger opened this issue · 0 comments

I create a texture that's shared between different objects that dynamically get created and destroyed. When the last object using a texture gets destroyed, the texture is deleted. So that when I create the next object that wants to use the texture, I get an error.

My workaround is to create materials together with the textures (that are never used), this keeps the textures alive. But I think that it's at least surprising if not an outright bug that a texture gets deleted while I have a reference to it.