Why not boost::shared_ptr<MSExperiment<Peak1D> > experiment_metadata = populateMetaData_(file_list[i])?

More intuitive usage and MSExperiment would be created where needed. Shared_ptr would die if not needed anymore.