title: memory leak in iPhone Obj C code
body: <p>I'm parsing an XML string and have a memory leak.  I know this code is leaking, but not sure what the fix is:</p>
  
  <p><a href="http://pastie.org/580694" rel="nofollow noreferrer">http://pastie.org/580694</a></p>
  
  <p>Code like this appears to be fundamentally flawed:</p>
  
  <pre><code>- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)value{
      if ([currentElement isEqualToString:@"problem_id"]){
          currentProblem.problemId = [[value copy] intValue];
      } else if ([currentElement isEqualToString:@"rule_instance_id"]){
          currentProblem.ruleInstanceId = [value copy];
      } else if ([currentElement isEqualToString:@"description"]){
          currentProblem.desc = [value copy];
      } else if ([currentElement isEqualToString:@"name"]){
          currentProblem.name = [value copy];
  </code></pre>
  
  <p>but not sure how I should deal with grabbing the found characters and retaining/releasing them.</p>
  
  <p>thanks</p>