RAII technique by std::string and std::vector