source / sink using shared_ptr