SWDEV-1 - Some 'delete' clean up

Change-Id: I02564f0f0e349375bde1471e9f82df268703367b


[ROCm/clr commit: 73967c3b17]
This commit is contained in:
Jason Tang
2021-09-06 17:55:09 -04:00
committed by Jason Tang
parent 3f5d248508
commit e94aec09bd
13 changed files with 49 additions and 123 deletions
+3 -4
View File
@@ -467,12 +467,11 @@ void Program::StubProgramSource(const std::string& app_name) {
size_t size = stub_read.tellg();
stub_read.seekg(0, std::ios::beg);
char* data = new char[size];
stub_read.read(data, size);
std::vector<char> file_data(size);
stub_read.read(file_data.data(), size);
stub_read.close();
sourceCode_.assign(data, size);
delete[] data;
sourceCode_.assign(file_data.data(), size);
} else {
std::fstream stub_write;
stub_write.open(file_name.str().c_str(), (std::fstream::out | std::fstream::binary));