Reduced redundant copies of shared_ptr when copying String.