diff options
author | Douglas Mencken <dougmencken@gmail.com> | 2016-01-08 22:30:56 -0500 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-01-12 08:30:26 +0000 |
commit | 23206f119d8d7a007514f2e8352da52829b30d5d (patch) | |
tree | 7c0e181c2fab8e5a9c8d3c9562855c2358e24fff /vcl | |
parent | b0058366190b63fcbc112b43d387f7600a7fe55d (diff) |
provide autorelease pool to avoid leaking
fixes “Object ... autoreleased with no pool in place - just leaking”
Change-Id: I8bb10adf779f57a9c7c9f1a38415d61e391d181e
Reviewed-on: https://gerrit.libreoffice.org/21370
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/osx/salinst.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 36e13e23c41b..153998a63be8 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -187,8 +187,10 @@ bool ImplSVMainHook( int * pnInit ) if (comphelper::LibreOfficeKit::isActive()) return false; + NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ]; unlink([[NSString stringWithFormat:@"%@/Library/Saved Application State/%s.savedState/restorecount.plist", NSHomeDirectory(), MACOSX_BUNDLE_IDENTIFIER] UTF8String]); unlink([[NSString stringWithFormat:@"%@/Library/Saved Application State/%s.savedState/restorecount.txt", NSHomeDirectory(), MACOSX_BUNDLE_IDENTIFIER] UTF8String]); + [ pool drain ]; gpnInit = pnInit; |