"platforms/reference/vscode:/vscode.git/clone" did not exist on "65ee8fd75cfb19e31ce071b73ec0938c4f508e2c"
Commit 3e43d52b authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed CUDA error when working with multiple contexts

parent 8fe2b5a5
......@@ -41,6 +41,7 @@ CudaArray::CudaArray(CudaContext& context, int size, int elementSize, const std:
CudaArray::~CudaArray() {
if (pointer != 0 && ownsMemory && context->getContextIsValid()) {
context->setAsCurrent();
CUresult result = cuMemFree(pointer);
if (result != CUDA_SUCCESS) {
std::stringstream str;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment