Zhen
Zhen

Reputation: 12431

Objective C: Memory Leak due to 'Incorrect decrement of reference count'

I am hitting the below memory leak warning after analyzing my code.

enter image description here

However, the warning is not showing up within my code to tell me exactly where this leak is happening. Can anyone advise me on what usually cause this leak and how can I search my code to identify it?

Upvotes: 2

Views: 262

Answers (1)

tia
tia

Reputation: 9718

http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/MemoryMgmt/Articles/mmRules.html#//apple_ref/doc/uid/20000994-BAJHFBGH

According to Cocoa naming convention, methods other than ones starting with init, new, copy or mutableCopy must return self-owned or autoreleased object. The caller must also aware that the object returned from the methods need no releasing.

Upvotes: 1

Related Questions