use shared_ptr instead of our own Reference Object
On the paper it seems that a shared_ptr
in c++ does exactly what our ReferenceObject is about. It maintains a reference count of the pointer usage and deallocate it when no one is using it anymore.
See: http://en.cppreference.com/w/cpp/memory/shared_ptr for more informations.
Proposal: replace the ReferenceObject
by a shared_ptr instance.
Goal: reduce the code and make it more atomic.
Thoughts?
Edited by benoît chesneau