Description
0 libsystem_malloc.dylib malloc_zone_calloc
1 libsystem_malloc.dylib calloc
2 libobjc.A.dylib class_createInstance
3 libobjc.A.dylib +[NSObject allocWithZone:]
4 libqcocoa.dylib -[QCocoaMenuLoader ensureAppMenuInMenu:]
5 libqcocoa.dylib QCocoaMenuBar::updateMenuBarImmediately()
6 QtCore void doActivate<false>(QObject*, int, void**)
7 QtGui QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent*)
8 QtGui bool QWindowSystemHelper<QWindowSystemInterface::SynchronousDelivery>::handleEvent<QWindowSystemInterfacePrivate::ActivatedWindowEvent, QWindow*, Qt::FocusReason>(QWindow*, Qt::FocusReason)
9 QtCore QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const
10 libqcocoa.dylib invocation function for block in qRegisterNotificationCallbacks()
11 Foundation -[__NSObserver _doit:]
12 CoreFoundation _CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER_
13 CoreFoundation ___CFXRegistrationPost_block_invoke
14 CoreFoundation _CFXRegistrationPost
15 CoreFoundation ___CFXNotificationPost_block_invoke
16 CoreFoundation -[_CFXNotificationRegistrar find:object:observer:enumerator:]
17 CoreFoundation _CFXNotificationPost
18 Foundation -[NSNotificationCenter postNotificationName:object:userInfo:]
The release/retain history for the leaked object is:
0 Malloc +1 1 00:00.709.304 libqcocoa.dylib -[QCocoaMenuLoader ensureAppMenuInMenu:]
1 Retain +1 2 00:00.709.354 AppKit -[NSMenu insertItem:atIndex:]
2 Retain +1 3 00:00.709.447 AppKit -[NSMenu itemArray]
3 Release -1 2 00:00.709.650 Foundation -[NSAutoreleasePool drain]
Retain/Release (2) 00:01.740.908 AppKit -[NSMenu removeItemAtIndex:]
4 Retain +1 3 00:01.740.908 AppKit -[NSMenu removeItemAtIndex:]
5 Release -1 2 00:01.740.909 AppKit -[NSMenu removeItemAtIndex:]
6 Release -1 1 00:01.741.128 libqcocoa.dylib -[QCocoaMenuLoader ensureAppMenuInMenu:]
Probably because ensureAppMenuInMenu does not use an autorelease pool and does not release the NSMenuItem it allocates before returning, but I am not familiar with Obj-C to say anything for sure.