Jump to content

  • Log In with Google      Sign In   
  • Create Account


memory leak when using NSString isEqualToString


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   -  Reputation: 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!!!!!

Sponsor:



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.



PARTNERS