diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2013-04-22 10:29:46 +0000 |
---|---|---|
committer | Andreas Färber <andreas.faerber@web.de> | 2013-05-29 01:22:24 +0200 |
commit | 6e657e64cdc478461c1e6a5e81c6d23115664326 (patch) | |
tree | b05611966ac37a3629f49c965d3f0e3e7d42307e /qtest.c | |
parent | 6a4e17711442849bf2cc731ccddef5a2a2d92d29 (diff) |
cocoa: Fix leaks of NSScreen and NSConcreteMapTable
On MacOSX 10.8 QEMU provokes system log messages:
11/03/2013 17:03:29.998 qemu-system-arm[42586]: objc[42586]: Object
0x7ffbf9c2f3b0 of class NSScreen autoreleased with no pool in place - just
leaking - break on objc_autoreleaseNoPool() to debug
11/03/2013 17:03:29.999 qemu-system-arm[42586]: objc[42586]: Object
0x7ffbf9c3a010 of class NSConcreteMapTable autoreleased with no pool in
place - just leaking - break on objc_autoreleaseNoPool() to debug
This is because we call back into Cocoa from threads other than
the UI thread (specifically from the CPU thread). Since we created
these threads via the POSIX API rather than NSThread, they don't have
automatically created autorelease pools. Guard all the functions where
QEMU can call back into the Cocoa UI code with autorelease pools
so that we don't leak any Cocoa objects.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Diffstat (limited to 'qtest.c')
0 files changed, 0 insertions, 0 deletions