SWDEV-485763 - Fix memory leaks in various unit tests
Fix memory leaks by adding missing destroy calls for
events, streams, and graphs at the end of tests.
Ensure that every test case executes destroy calls,
regardless of whether it passes or fails.
Change-Id: I814e35c528d90ed2abb34d77377f1a7fd3f1f11c
[ROCm/hip-tests commit: 9cffda4ebb]
此提交包含在:
1 父節點
d9482cf69c
當前提交
fe9860bd47
33 file changed
+142
-38
No files matched your search
@@ -94,6 +94,8 @@ static void hipTestWithGraph() {
|
||||
delete[] out_h;
|
||||
HIP_CHECK(hipFree(in_d));
|
||||
HIP_CHECK(hipFree(out_d));
|
||||
HIP_CHECK(hipGraphExecDestroy(instance));
|
||||
HIP_CHECK(hipStreamDestroy(stream));
|
||||
}
|
||||
|
||||
static void hipTestWithoutGraph() {
|
||||
@@ -143,6 +145,7 @@ static void hipTestWithoutGraph() {
|
||||
delete[] out_h;
|
||||
HIP_CHECK(hipFree(in_d));
|
||||
HIP_CHECK(hipFree(out_d));
|
||||
HIP_CHECK(hipStreamDestroy(stream));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
封鎖使用者