Avoid manual memory management.

Change-Id: Id29d9ec366e338d519aad5353a15a44ecf5998e4
This commit is contained in:
Piotr Fusik
2019-02-11 16:49:23 +01:00
committed by sys_ocldev
parent 5e8fb19e5d
commit 6882cf09c1
10 changed files with 41 additions and 87 deletions

View File

@@ -19,14 +19,7 @@ CommandStreamReceiverWithAUBDump<BaseCSR>::CommandStreamReceiverWithAUBDump(cons
bool createAubCsr = !executionEnvironment.aubCenter || executionEnvironment.aubCenter->getAubManager() == nullptr;
if (createAubCsr) {
aubCSR = AUBCommandStreamReceiver::create(hwInfoIn, baseName, false, executionEnvironment);
}
}
template <typename BaseCSR>
CommandStreamReceiverWithAUBDump<BaseCSR>::~CommandStreamReceiverWithAUBDump() {
if (aubCSR) {
delete aubCSR;
aubCSR.reset(AUBCommandStreamReceiver::create(hwInfoIn, baseName, false, executionEnvironment));
}
}