diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-04 13:30:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-05 13:49:22 +0200 |
commit | cc483d0470dbf0d01e4da818b148ff0b851c5187 (patch) | |
tree | 8775e63c99cca6d0d44c0f2820d859691edb4cfa /sw/source/core/inc/SwXMLTextBlocks.hxx | |
parent | 74977861a63c920f9b49e90087cac9a841392729 (diff) |
tdf#112292 - fix memory leak and use more auto ref counting in sw
this bug was introduced in
commit a754294ac7a902fe96fbbd6b8b6824a360d6b248
use rtl::Reference in SwDocFac instead of manual acquire/release
fix it by using automatic ref-counting (i.e. rtl::Reference) everywhere.
Note that the logic in SwViewShell::~SwViewShell is somewhat
interesting.
From my reading of it, it was previously potentially calling
getIDocumentLayoutAccess on an SwDoc that had just been deleted.
So if there is a problem with this commit I would look there first.
Change-Id: I95b6b7e7523689c8b56063af642c3a84cbdcd331
Reviewed-on: https://gerrit.libreoffice.org/43131
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/inc/SwXMLTextBlocks.hxx')
-rw-r--r-- | sw/source/core/inc/SwXMLTextBlocks.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx index e4305c071c20..d164d5249554 100644 --- a/sw/source/core/inc/SwXMLTextBlocks.hxx +++ b/sw/source/core/inc/SwXMLTextBlocks.hxx @@ -88,7 +88,7 @@ public: virtual bool PutMuchEntries( bool bOn ) override; public: - SwDoc* GetDoc() const { return m_pDoc; } + SwDoc* GetDoc() const { return m_xDoc.get(); } //void SetDoc( SwDoc * pNewDoc); ErrCode StartPutBlock( const OUString& rShort, const OUString& rPackageName ); ErrCode PutBlock(); |