Merge pull request #5 from mlemanczyk/codex/analyze-evenbitperfectscanner-for-memory-exception-fixes

Ensure GPU buffers are disposed safely
This commit is contained in:
Marek Lemańczyk authored and GitHub committed 2025-09-10 03:16:34 +02:00
commit b404c51d66
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();
}
}
}