Ken Thomases : winemac: Set up and drain autorelease pool in LogErrorv() so it's safe to call from background threads.
Alexandre Julliard
julliard at winehq.org
Mon Apr 22 14:29:17 CDT 2013
Module: wine
Branch: master
Commit: 72be23270ed36bc9508e48871891c068b879cef9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=72be23270ed36bc9508e48871891c068b879cef9
Author: Ken Thomases <ken at codeweavers.com>
Date: Sun Apr 21 21:31:28 2013 -0500
winemac: Set up and drain autorelease pool in LogErrorv() so it's safe to call from background threads.
---
dlls/winemac.drv/cocoa_app.m | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index 1ef453f..204734c 100644
--- a/dlls/winemac.drv/cocoa_app.m
+++ b/dlls/winemac.drv/cocoa_app.m
@@ -1410,9 +1410,13 @@ void LogError(const char* func, NSString* format, ...)
*/
void LogErrorv(const char* func, NSString* format, va_list args)
{
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+
NSString* message = [[NSString alloc] initWithFormat:format arguments:args];
fprintf(stderr, "err:%s:%s", func, [message UTF8String]);
[message release];
+
+ [pool release];
}
/***********************************************************************
More information about the wine-cvs
mailing list