Re: leaks within HIToolbox?!?
Re: leaks within HIToolbox?!?
- Subject: Re: leaks within HIToolbox?!?
- From: "David M. Cotter" <email@hidden>
- Date: Wed, 18 Nov 2009 15:54:31 -0800
perhaps this is an xcode question?
does anyone have an answer to this?
it seems that GetThemeTextDimensions() and DrawThemeText() both cause lots and lots of leaks! why?
On Nov 17, 2009, at 11:56 PM, David M. Cotter wrote:
> does this seem right to you?
>
> according to instruments: (ObjectAlloc + Leaks)
> calling WaitNextEvent() causes leaks? (i know: don't use WNE, please save that reply for another thread)
>
> 1KB each time (several in a row)
>
> 0 libSystem.B.dylib malloc
> 1 HIToolbox CopyEventInternal(__CFAllocator const*, OpaqueEventRef*)
> 2 HIToolbox CopyEventAs
> 3 HIToolbox HandleTSMMouseDownLogic
> 4 HIToolbox ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)
> 5 HIToolbox DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*)
> 6 HIToolbox SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*)
> 7 HIToolbox SendEventToEventTarget
> 8 HIToolbox ToolboxEventDispatcher
> 9 HIToolbox GetOrPeekEvent
> 10 HIToolbox GetNextEventMatchingMask
> 11 HIToolbox WNEInternal
> 12 HIToolbox WaitNextEvent
> 13 MyApp CApp::HandleOneEvent(long) /Users/davec/Developer/depot/MyApp/Development/ source/Sources/CApp.cpp:1057
>
> and 2KB each: (bunch all at once, periodically)
>
> 0 CoreGraphics CGSNewElementFromPool
> 1 CoreGraphics handleDecodedEvent
> 2 CoreGraphics CGSDecodeEventRecord
> 3 CoreGraphics CGSDispatchDatagramsFromStream
> 4 CoreGraphics snarfEvents
> 5 CoreGraphics CGSGetNextEventRecordInternal
> 6 CoreGraphics CGEventCreateNextEvent
> 7 HIToolbox PullEventsFromWindowServerOnConnection(unsigned int, unsigned char)
> 8 CoreFoundation __CFMachPortPerform
> 9 CoreFoundation __CFRunLoopRun
> 10 CoreFoundation CFRunLoopRunSpecific
> 11 CoreFoundation CFRunLoopRunInMode
> 12 HIToolbox RunCurrentEventLoopInMode
> 13 HIToolbox GetNextEventMatchingMask
> 14 HIToolbox WNEInternal
> 15 HIToolbox WaitNextEvent
> 16 kJams Pro Debug CApp::HandleOneEvent(long) /Users/davec/Developer/depot/kJams/Development/ source/Sources/CApp.cpp:1057
>
> ==========================================================
> also calling GetThemeTextDimensions() (many variously sized leaked allocations here, even with an nsautorelease pool)
>
> 0 libSystem.B.dylib calloc
> 1 CoreText TNativeGlyphStorage::ExpandGlyphs(long)
> 2 CoreText TNativeGlyphStorage::TNativeGlyphStorage(long)
> 3 CoreText TTypesetterAttrString::Initialize()
> 4 CoreText CTLineCreateWithAttributedString
> 5 HIToolbox TCoreTextEngine::LayoutSingleLine(THIThemeTextInfo*, float)
> 6 HIToolbox TCoreTextEngine::Layout(THIThemeTextInfo*, float, float, TextLayoutType)
> 7 HIToolbox TCoreTextEngine::GetThemeTextDimensions(float, THIThemeTextInfo*, float*, float*, float*)
> 8 HIToolbox DataEngine::GetTextDimensions(void const*, float, HIThemeTextInfo*, float*, float*, float*)
> 9 HIToolbox HIThemeGetTextDimensions
> 10 HIToolbox GetThemeTextDimensions
> 11 kJams Pro Debug CDB_Callbacks_Tracks::GetRect_Custom(CPlayList*, unsigned long, Rect const&, CDB_Callbacks_Tracks::GRP_RectType, __CFString const*, short) /Users/davec/Developer/depot/kJams/Development/ source/Windows/../Music/CBrowser_Track.cpp:116
>
> 0 libSystem.B.dylib calloc
> 1 CoreText TNativeGlyphStorage::ExpandGlyphs(long)
> 2 CoreText TNativeGlyphStorage::TNativeGlyphStorage(long)
> 3 CoreText TTypesetterAttrString::Initialize()
> 4 CoreText CTLineCreateWithAttributedString
> 5 HIToolbox TCoreTextEngine::LayoutSingleLine(THIThemeTextInfo*, float)
> 6 HIToolbox TCoreTextEngine::Layout(THIThemeTextInfo*, float, float, TextLayoutType)
> 7 HIToolbox TCoreTextEngine::GetThemeTextDimensions(float, THIThemeTextInfo*, float*, float*, float*)
> 8 HIToolbox DataEngine::GetTextDimensions(void const*, float, HIThemeTextInfo*, float*, float*, float*)
> 9 HIToolbox HIThemeGetTextDimensions
> 10 HIToolbox GetThemeTextDimensions
> 11 kJams Pro Debug CDB_Callbacks_Tracks::GetRect_Custom(CPlayList*, unsigned long, Rect const&, CDB_Callbacks_Tracks::GRP_RectType, __CFString const*, short) /Users/davec/Developer/depot/kJams/Development/ source/Windows/../Music/CBrowser_Track.cpp:116
>
> 0 CoreFoundation __CFBasicHashRehash
> 1 CoreFoundation __CFBasicHashAddValue
> 2 CoreFoundation CFBasicHashAddValue
> 3 CoreFoundation CFDictionaryAddValue
> 4 HIToolbox TThemeTextCache::Release(TThemeText*)
> 5 HIToolbox ThemeTextRelease(TThemeText*)
> 6 HIToolbox DataEngine::GetTextDimensions(void const*, float, HIThemeTextInfo*, float*, float*, float*)
> 7 HIToolbox HIThemeGetTextDimensions
> 8 HIToolbox GetThemeTextDimensions
> 9 kJams Pro Debug CDB_Callbacks_Tracks::GetRect_Custom(CPlayList*, unsigned long, Rect const&, CDB_Callbacks_Tracks::GRP_RectType, __CFString const*, short) /Users/davec/Developer/depot/kJams/Development/ source/Windows/../Music/CBrowser_Track.cpp:116
>
> etc etc, i could go on.
>
> but is this expected?
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Carbon-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden