Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

memory leak when using NSString isEqualToString

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
No replies to this topic

#1 Vorel512   Members   

130
Like
0Likes
Like

Posted 03 May 2012 - 08:20 AM

Hello there experts!

So...
I have an array (NSMutableArray) of a class.
In the class I store Name and Address.
When I want to compare the contents to a string, which I've added by code, it eats more and more memory.
if ([[[cManager getAttributeAtIndex:index] getAttribName] isEqualToString:@"adam"])
{
    NSLog(@"match!");
}

getAttribName is the name of the person in an NSString object.
When I run Instruments, it tells me, that the program eats more and more memory. If I comment out this if function, the growing stops.
For me it looks like I've allocate a variable and not deallocate it.
I am out of ideas what's gone wrong, so every help is appreciate!!!!!




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.