[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sc/qa

Tor Lillqvist tml at collabora.com
Sat Apr 2 19:02:20 UTC 2016


 sc/qa/unit/opencl-test.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 5c5183705d913ec9bf6fc48e46ecbe1ff15c5f14
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Mar 29 13:04:34 2016 +0300

    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
    (cherry picked from commit 22fd8e743f455ab072086fb91c29a40f391403a9)
    Reviewed-on: https://gerrit.libreoffice.org/23650
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index 53699a8..dfdf560 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();


More information about the Libreoffice-commits mailing list