Little confused about the message from Analyze command in Xcode 4.2. It complains about the instance variable activityView.

Analyze tool complains on [self startRefresh:NULL] line about potential leak of activityView.
- activityView is an instance variable, and is synthesized
- I am releasing activityView in dealloc()
- Per my understanding, when the setter is used (implicitly via self.activityView), the previous value is released, right?
So, I how should I read the warning from the Analyze tool? Or what changes do I need?
Thx.
Assuming the @property has the retain attribute, the setter will retain this new activity view, so you are still responsible for the +1 count from the alloc/init.
So you can do something like this:
Just autorelease the new instance to balance out the alloc/init.
The analyzer isn’t warning you about the previous value of activityView. It’s warning you about the new instance, which effectively has a +2 retain count after your alloc/init and the @property (retain).