brian
brian

Reputation: 3394

Does the leaks tool in Instruments give false positives?

I have autoreleased objects that I am assigning to synthesized (retain) properties on an object but it is marking them as leaked. Does leaks just sometimes have false positives or am I missing something?

Upvotes: 1

Views: 691

Answers (1)

M. Ryan
M. Ryan

Reputation: 7192

a retain property will overrule an autorelease.

EDIT for clarity, I don't mean overrule. I mean... it will prevent an autorelease from forcing a dealloc. See comments for all the grimy details.

you should be manually releasing that property in your dealloc to let autorelease run its course

Upvotes: 6

Related Questions