Merge pull request #5 from mlemanczyk/codex/analyze-evenbitperfectscanner-for-memory-exception-fixes
Ensure GPU buffers are disposed safely
This commit is contained in:
1 file changed
+5
-6
@@ -74,14 +74,13 @@ public class MersenneNumberResidueGpuTester(bool useGpuOrder)
|
|||||||
|
|
||||||
kStart += batchSize128;
|
kStart += batchSize128;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
ArrayPool<ulong>.Shared.Return(orderArray);
|
ArrayPool<ulong>.Shared.Return(orderArray);
|
||||||
}
|
|
||||||
|
|
||||||
orderBuffer.Dispose();
|
orderBuffer.Dispose();
|
||||||
gpuLease.Dispose();
|
gpuLease.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user