That's not real reference counting. Looks more like a home-made garbage collection system to me (I use it too to clean-up all kinds of objects in my engine that were deleted during the "frame update" in question).
Are you now referring to performance now? or is it something else?If you are planning to implement it throughout your game engine, I'd recommend doing a fairly thorough cost/benefit analysis to see if it would be a good idea or not.
I'm considering to use this for my resource-management (textures, shaders, models etc). I still have some doubts on whether I will actually make use of this feature (I'll use a boolean to enable ref-counting for a specific resource). For example, it would be annoying if a texture was needed somewhere, after it has been freed by the system because there were no refs left. Just loading everything at startup and breaking things down in the end seems as the easiest sollution. On the other hand, this would give overhead as the game might not use all the resources it potentially "could" use.
Bookmarks