Un-parented MeshObjectNode being disposed?
#5
There is actually a bug in the code, that happens when you add a SceneNode back to the scene and that SceneNode was before removed from the scene. In this case the Dipose method will be called on the SceneNode again. So another AddRef would be needed when you add the SceneNode back to the tree.

This process will be improved in the next version so you will be able to remove and add SceneNodes from and to the DXScene without any problems.

Therefore you should not use AddRef methods in this case because this would break the reference count when the next version is out.

A current workaround is to create a new SceneNode (for example MeshObjectNode) when you want to add it back to the scene (you can reuse the material and mesh).
Andrej Benedik
  


Messages In This Thread
RE: Un-parented MeshObjectNode being disposed? - by abenedik - 03-09-2018, 12:45 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)