Thanks for the link.
I think what I want is actualy simpler than the topic of the thread, unless I'm not understanding it properly.
For my purposes I don't care how many references to an entity there are. I just need to know if the entity exists or not. By my understanding if I creat a sphere, and then create another handle to that sphere, I have 2 references to the same object. if I call FreeEntity() on either handle it will remove the sphere, but I will have 2 handles pointing to some random spot in memory where the sphere used to be. What I need to be able to do is find out, through either of those handles, if the sphere itself has been freed or not...
untested example would look something like this.
I think what I want is actualy simpler than the topic of the thread, unless I'm not understanding it properly.
For my purposes I don't care how many references to an entity there are. I just need to know if the entity exists or not. By my understanding if I creat a sphere, and then create another handle to that sphere, I have 2 references to the same object. if I call FreeEntity() on either handle it will remove the sphere, but I will have 2 handles pointing to some random spot in memory where the sphere used to be. What I need to be able to do is find out, through either of those handles, if the sphere itself has been freed or not...
untested example would look something like this.
mySphere = CreateSphere(8) ' make a sphere anotherWayToLookAtMySphere = mySphere ' get an extra handle to the sphere FreeEntity(mySphere) ' kills the sphere in the 3D world ' if I try to MoveEntity(mySphere) or MoveEntity(anotherWayToLookAtMySphere) the program will crash because the sphere entity no longer exists...