title: or [self dealloc] work?
body: <p>I make a object that use the camera to decode a bar code. If it was successful it send a delegate message to next action, if not, it only go out, and next screen start to work.</p>
  
  <p>If am I in the last command of the object, can I send [self release] to free the memory? But, the problem is: the retainCount can be more than on one?</p>
  
  <p>Like</p>
  
  <pre><code>  ObjectToDealloc *test = [[ObjectToDealloc alloc] init];
    [test doYourJob];
    //can't release here, it broke my program
  </code></pre>
  
  <p>in the last thing that this object do, it run:</p>
  
  <pre><code>  -(void)destroyYourself {
       [self release];
       [self dealloc];
    }
  </code></pre>
  
  <p>This will work? I will release the memory? Or I have to make "test" in global visibility (not only function visibility) and do a: </p>
  
  <pre><code>   [test release];
  </code></pre>