Atomic reference counting + mutexes for protection against concurrency issues