cpp: use a single entity shared pointer in source file