noteNewRecentDocumentURL leaks?
noteNewRecentDocumentURL leaks?
- Subject: noteNewRecentDocumentURL leaks?
- From: Alex Eddy <email@hidden>
- Date: Sat, 31 Jul 2004 23:23:13 -0700
On 10.3.4, this code:
[[NSDocumentController sharedDocumentController]
noteNewRecentDocumentURL:[NSURL fileURLWithPath:path]];
causes 7 leaks per invocation similar to the following:
Leak: 0x00411280 size=48 instance of 'NSCFString'
0xa01905f4 0x0001078c 0x262f4c69 0x62726172
0x792f4d61 0x6e616765 0x64205072 0x65666572
0x656e6365 0x732f6172 0x656b6b75 0x73752f00
Call stack: [thread ffffffff]: | 0x0 | _pthread_body |
forkThreadForFunction | -[MyApplication openFolders:] |
_LSAddRecentItem | GetRecentInfoFromPath | GetRecentInfoFromFSRef |
GetIconRefFromFileInfo | GetImageForFSItem | ISBuildBaseImage(FSRef
const*, HFSUniStr255 const*, unsigned long*, FSCatalogInfo*,
CustomBadgeResource*, unsigned long, unsigned char*) |
GetFolderType(FSRef const*, short, long, long, HFSUniStr255 const*,
unsigned char, unsigned char) | FindFolder | FindFolderGuts |
ResolveSpecialFolder | GetClassicDomainSystemFolder |
ResolveClassicDomainSystemFolder | ClassicVolumeGetStartupInfo |
ReadPrefsVolumeAndDirID | TryPreferenceValues |
GetNumericPreferenceValue | MyCFPreferencesCopyValueNoCache |
_CFPreferencesURLForManagedDomain | CFStringCreateWithFormat |
_CFStringCreateWithFormatAndArgumentsAux | CFStringCreateCopy |
__CFStringCreateImmutableFunnel3 | _CFRuntimeCreateInstance |
malloc_zone_malloc
Leak: 0x00411050 size=48 instance of 'NSURL'
0x00400f50 0x00011380 0x00001000 0x00411150
0x00000000 0x00000000 0x00000000 0x08000100
0x00000000 0x55555555 0x55555555 0x55555555
Call stack: [thread 9243d8ff]: | 0x0 | _pthread_body |
forkThreadForFunction | -[MyApplication openFolders:] |
_LSAddRecentItem | GetRecentInfoFromPath | GetRecentInfoFromFSRef |
GetIconRefFromFileInfo | GetImageForFSItem | ISBuildBaseImage(FSRef
const*, HFSUniStr255 const*, unsigned long*, FSCatalogInfo*,
CustomBadgeResource*, unsigned long, unsigned char*) |
GetFolderType(FSRef const*, short, long, long, HFSUniStr255 const*,
unsigned char, unsigned char) | FindFolder | FindFolderGuts |
GetInternalFolderDesc | FindClassicDomainFolderDesc |
IsClassicFolderRedirectionEnabled |
DetermineClassicFolderRedirectionStatus |
MyCFPreferencesCopyValueNoCache | _CFPreferencesURLForManagedDomain |
CFURLCreateWithFileSystemPath |
CFURLCreateWithFileSystemPathRelativeToBase | _CFURLAlloc |
_CFRuntimeCreateInstance | malloc_zone_malloc
I call this from a thread in a Cocoa NON-document-based app, where the
thread was invoked by the delegate's application: openFiles: method.
Same code, but called from the main thread, still leaks.
Using a constant path like @"/System" still leaks.
Tacking on an autorelease to the NSURL makes me crash (as expected.)
Commenting out that line puts me back at zero leaks.
So, is this a known bug with noteNewRecentDocumentURL?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.