Memory Leak

Discussion in 'iOS Programming' started by Sergio10, Apr 25, 2010.

  1. Sergio10 macrumors regular

    Joined:
    Oct 3, 2007
    #1
    HI,

    "Leaks" instrument shows that current code has leak:
    PHP:
    - (void)setCity:(NSString*)aCity 

        if(
    aCity != nil
        { 
            [
    city setString:aCity];  // it show here
        

    }  
    How to solve the problem?

    Thanks.
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    What is city? How is the method setString: defined?
     

Share This Page