Concurrency Issue
Well its not really an issue yet, but its definitely possible.
K say I have 2 threads.
Thread one uses these objects to do stuff and call their functions.
Thread two deletes the objects not in use So thread one can worry about other things.
Now say thread two deletes a object while thread one is using it. Now thread one checks to make sure the the object isn't deleted before it calls its functions, but with multiple cores, its possible thread 2 deleted thread 1's object immediately after it checked. Is there a full proof way to make sure thread one is never using something thread two deleted?
K say I have 2 threads.
Thread one uses these objects to do stuff and call their functions.
Thread two deletes the objects not in use So thread one can worry about other things.
Now say thread two deletes a object while thread one is using it. Now thread one checks to make sure the the object isn't deleted before it calls its functions, but with multiple cores, its possible thread 2 deleted thread 1's object immediately after it checked. Is there a full proof way to make sure thread one is never using something thread two deleted?


