title: Automatic Reference Counting Issue: Assigning retained object to unsafe_unretained variable; object will be released after assignment
body: <p>I'm getting this warning</p>
  
  <blockquote>
    <p>"Automatic Reference Counting Issue: Assigning retained object to unsafe_unretained variable; object will be released after assignment"</p>
  </blockquote>
  
  <p>Here is the code</p>
  
  <p>.h</p>
  
  <pre><code>@interface myObject : NSObject
  {
  }
  
  @property (assign) id progressEnergy;
  
  @end
  </code></pre>
  
  <p>.m</p>
  
  <pre><code>@implementation myObject
  
  @synthesize progressEnergy;
  
  -(id)init
  {
      if ( ( self = [super init] ) )
      {
          progressEnergy = [[progress alloc] init]; //warning appear on this line
      }
  
      return self;
  }
  
  @end
  </code></pre>
  
  <p>I have already tried</p>
  
  <pre><code>@property (assign) progress* progressEnergy;
  </code></pre>
  
  <p>but no luck</p>
  
  <p>Can you please help me figure out what is wrong?</p>