xamarin / urho

Code to integrate with the Urho3D engine
Other
463 stars 122 forks source link

Textures get deleted unintendedly #403

Open Haukinger opened 4 years ago

Haukinger commented 4 years ago

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.