• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Newbie question - Leak in NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie question - Leak in NSDictionary


  • Subject: Newbie question - Leak in NSDictionary
  • From: Andres Ramirez <email@hidden>
  • Date: Sun, 16 Mar 2003 08:40:38 -0500

Hello. I seem to be missing an important concept, since this code is
leaking. The initial parts of the messages I get are pasted after
the code. As far as I can tell, the leak happens due to the
NSDictionary line. If I comment that out, there are no leaks ... but
my function doesn't do much.
I've even tried passing it a constant string, so it really seems to
be how I handle the NSDictionary.

AR::FileType
AR::FileIOCocoa::GetFileType( const char * filePath){

AR::FileType arType = AR::UNKNOWN;

// Get the default file manager to query
NSFileManager * theFileMan = [ NSFileManager defaultManager ];

NSString * filePathStr = [NSString stringWithCString:filePath];
//NSString *filePathStr = [[NSString alloc] initWithCString:filePath];

NSDictionary *fileInfo = [ theFileMan fileAttributesAtPath:
filePathStr traverseLink:YES];


return arType;

}

ERROR message on console ----------------------

2003-03-16 08:30:27.565 AR_Transporter_Parts[2143] ***
_NSAutoreleaseNoPool(): Object 0xc5740 of class NSCFString
autoreleased with no pool in place - just leaking
2003-03-16 08:30:27.567 AR_Transporter_Parts[2143] ***
_NSAutoreleaseNoPool(): Object 0xc7ac0 of class NSFileAttributes
autoreleased with no pool in place - just leaking
....

Thank you in advance

- Andres
--
------------
Andres Ramirez
Motion Graphics & Multimedia
617-413-8582
http://www.pixeldream.com
________
_______________________________________________
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.

  • Follow-Ups:
    • Re: Newbie question - Leak in NSDictionary
      • From: Thomas Lachand-Robert <email@hidden>
  • Prev by Date: Re: State of Cocoa adoption
  • Next by Date: Re: Trouble with a save panel
  • Previous by thread: Re: NSString array to -> char**
  • Next by thread: Re: Newbie question - Leak in NSDictionary
  • Index(es):
    • Date
    • Thread