@@ -70,6 +70,8 @@ common_test_body(size_t nbytes, const DPPLSyclUSMRef Ptr,
7070 EXPECT_TRUE (DPPLDevice_AreEq (Dev, QueueDev));
7171
7272 DPPLQueue_Prefetch (Q, Ptr, nbytes);
73+ DPPLQueue_Delete (QueueDev);
74+ DPPLDevice_Delete (Dev);
7375}
7476
7577} // end of namespace
@@ -97,6 +99,7 @@ TEST_F(TestDPPLSyclUSMInterface, MallocShared)
9799
98100 common_test_body (nbytes, Ptr, Q, " shared" );
99101 DPPLfree_with_queue (Ptr, Q);
102+ DPPLQueue_Delete (Q);
100103}
101104
102105TEST_F (TestDPPLSyclUSMInterface, MallocDevice)
@@ -112,6 +115,7 @@ TEST_F(TestDPPLSyclUSMInterface, MallocDevice)
112115
113116 common_test_body (nbytes, Ptr, Q, " device" );
114117 DPPLfree_with_queue (Ptr, Q);
118+ DPPLQueue_Delete (Q);
115119}
116120
117121TEST_F (TestDPPLSyclUSMInterface, MallocHost)
@@ -127,6 +131,7 @@ TEST_F(TestDPPLSyclUSMInterface, MallocHost)
127131
128132 common_test_body (nbytes, Ptr, Q, " host" );
129133 DPPLfree_with_queue (Ptr, Q);
134+ DPPLQueue_Delete (Q);
130135}
131136
132137TEST_F (TestDPPLSyclUSMInterface, AlignedAllocShared)
@@ -142,6 +147,7 @@ TEST_F(TestDPPLSyclUSMInterface, AlignedAllocShared)
142147
143148 common_test_body (nbytes, Ptr, Q, " shared" );
144149 DPPLfree_with_queue (Ptr, Q);
150+ DPPLQueue_Delete (Q);
145151}
146152
147153TEST_F (TestDPPLSyclUSMInterface, AlignedAllocDevice)
@@ -157,6 +163,7 @@ TEST_F(TestDPPLSyclUSMInterface, AlignedAllocDevice)
157163
158164 common_test_body (nbytes, Ptr, Q, " device" );
159165 DPPLfree_with_queue (Ptr, Q);
166+ DPPLQueue_Delete (Q);
160167}
161168
162169TEST_F (TestDPPLSyclUSMInterface, AlignedAllocHost)
0 commit comments