Skip to content

Commit 51bb2b4

Browse files
committed
fix: kronecker memory leaks
1 parent 2d86b35 commit 51bb2b4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/GraphBLAS-sharp.Backend/Operations/Kronecker.fs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ module internal Kronecker =
224224

225225
processor.Post(Msg.CreateRunMsg<_, _> kernel)
226226

227+
rowOffset.Free processor
228+
columnOffset.Free processor
229+
227230
(sum.ToHostAndFree processor) + startIndex
228231

229232
let private copyToResult (clContext: ClContext) workGroupSize =
@@ -271,6 +274,9 @@ module internal Kronecker =
271274

272275
processor.Post(Msg.CreateRunMsg<_, _> kernel)
273276

277+
rowOffset.Free processor
278+
columnOffset.Free processor
279+
274280
let private insertZero (clContext: ClContext) workGroupSize =
275281

276282
let copy = copyToResult clContext workGroupSize

0 commit comments

Comments
 (0)