Dispose GPU resources safely
This commit is contained in:
1 parent
c05cb04a5c
commit
77fbbceeec
1 file changed
+5
-6
@@ -74,14 +74,13 @@ public class MersenneNumberResidueGpuTester(bool useGpuOrder)
|
||||
|
||||
kStart += batchSize128;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
ArrayPool<ulong>.Shared.Return(orderArray);
|
||||
}
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
ArrayPool<ulong>.Shared.Return(orderArray);
|
||||
orderBuffer.Dispose();
|
||||
gpuLease.Dispose();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user