Re: Calling allObjects memory allocation problem
Re: Calling allObjects memory allocation problem
- Subject: Re: Calling allObjects memory allocation problem
- From: Nick Zitzmann <email@hidden>
- Date: Thu, 20 May 2010 21:37:06 -0600
On May 19, 2010, at 5:36 AM, Vassilis Pantazis wrote:
> Hello,
>
> I have in my code the following statement:
>
> NSDirectoryEnumerator* dirEnum;
> NSArray* inDirContents;
>
> dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:inPath]; //
> inPath is a valid path
> inDirContents = [dirEnum allObjects];
>
> I have noticed that when the path contains many objects, a significant
> amount of memory is allocated that is not released, neither when trying to
> explicitly release inDirContents, nor when using an autorelease pool.
> Can someone explain to me why this happens please and how to solve it?
Have you tried using the object alloc instrument in Instruments? That will show you what is really going on with your application's memory usage.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden