[Libreoffice-commits] core.git: vcl/osx
Douglas Mencken
dougmencken at gmail.com
Tue Jan 12 00:30:49 PST 2016
vcl/osx/salinst.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 23206f119d8d7a007514f2e8352da52829b30d5d
Author: Douglas Mencken <dougmencken at gmail.com>
Date: Fri Jan 8 22:30:56 2016 -0500
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 at libreoffice.org>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 36e13e2..153998a 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;
More information about the Libreoffice-commits
mailing list