summaryrefslogtreecommitdiff
path: root/sc/qa/unit/opencl-test.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-03-29 13:04:34 +0300
committerTor Lillqvist <tml@collabora.com>2016-03-29 14:03:23 +0300
commit22fd8e743f455ab072086fb91c29a40f391403a9 (patch)
tree226404a6b49886cabb335eae83230effda34a38a /sc/qa/unit/opencl-test.cxx
parent1c21379e6533c97f7a2f5d1e7db49408da4b74b7 (diff)
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
Diffstat (limited to 'sc/qa/unit/opencl-test.cxx')
-rw-r--r--sc/qa/unit/opencl-test.cxx6
1 files changed, 6 insertions, 0 deletions
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();