cocoa - ARC: Analyzer warnings with Objective-C code using core foundation -


using analyzer on objective-c | cocoa / core foundation code, got few error can't fix because don't understand them.

error #1: in objective-c class header, declare property.

@property(readwrite) cfmutablesetref gclients; 

in body, following error:

enter image description here

question: why leak ? store in property , dispose of later. thought arc knew how deal cf "objects".

error #2: later on, have error when releasing object:

enter image description here

question: how can take 2 analyzer warnings account in order create code works (self.gclients lives between calls clientinitialize , destroyallclients) not flagged?

arc doesn't manage cf objects without manual intervention. there work need first.

see http://www.idryman.org/blog/2012/11/22/arc-best-practices-and-pitfalls/ @ "arc , toll-free bridging". there special casting tricks (__bridge_transfer).


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -