A shared pointer uses reference counting to allow multiple code structures or classes to maintain  non exclusive ownership of a pointer without leaking memory.