Unverified Commit 424c06e4 authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #2035 from peastman/cudacontext

Fixed CUDA error when working with multiple contexts
parents 8fe2b5a5 3e43d52b
......@@ -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