From f3ba8c8707a577991994c1172b9f84ec22c775ef Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 12 Mar 2009 17:26:21 +0000 Subject: [PATCH] Introduced a releaseAllOperation after completeion of OperationThread::run() to enable CUDA integration (in osgCuda) to be able to free up its resources. Code drawn from a submission from Mick. --- src/osg/GraphicsThread.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osg/GraphicsThread.cpp b/src/osg/GraphicsThread.cpp index 3401685d2..cac0ea4a8 100644 --- a/src/osg/GraphicsThread.cpp +++ b/src/osg/GraphicsThread.cpp @@ -37,6 +37,9 @@ void GraphicsThread::run() OperationThread::run(); + // release operations before the thread stops working. + _operationQueue->releaseAllOperations(); + if (graphicsContext) { graphicsContext->releaseContext();