From 22fd8e743f455ab072086fb91c29a40f391403a9 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 29 Mar 2016 13:04:34 +0300 Subject: Avoid running out of memory on Windows when OpenCL is available Call Clear() on the ScDocShellRef (derived from tools::SvRef) members of the ScOpenCLTest object in tearDown(). Otherwise the memory used by the ScDocShellRef objects in each ScOpenCLTest object would be held until when all the ScOpenCLTest objects are destroyed in the end. (CppUnit creates all the ScOpenCLTest objects in advance, then calls the test functions on them, and then destroys them.) The issue was a side-effect of the (otherwise nice) fix for tdf#89267. Change-Id: Ie5c59f2f089386c0abc135136397e1653c975fdc --- sc/qa/unit/opencl-test.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sc/qa') diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 53699a8d6928..dfdf56086a65 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -4771,9 +4771,15 @@ void ScOpenCLTest::tearDown() { //close test env if(xDocSh.Is()) + { xDocSh->DoClose(); + xDocSh.Clear(); + } if(xDocShRes.Is()) + { xDocShRes->DoClose(); + xDocShRes.Clear(); + } uno::Reference< lang::XComponent > ( m_xCalcComponent, UNO_QUERY_THROW )->dispose(); -- cgit