On Oct 21, 2009, at 1:39 AM, Nick Rogers wrote:

> (gdb) info gc-roots 0x2004f9340
> Number of roots: 1
> Root:
>   0 Kind: bytes   rc:   1  Address: 0x0000000200543b40  Offset: 
> 0x0000000000000008
>   1 Kind: object  rc:   0  Address: 0x00000002004f9340  Class: Volume
> 
> Is there a retain cycle problem.
> The memory gathered by this ivar is not freed, as per Obj-Alloc Instrument.
> 
> What shall I make out of these results and how can they lead to refinement 
> (so that all the memory referenced by this ivar is freed)?

"rc: 1" means that the object has been CFRetain'd by something.  That is, 
something somewhere decided that it was going to bypass the collector and has 
failed to call CFRelease when done.

Use the ObjectAlloc instrument in Instruments to track it down. You can also:

set env MallocStackLoggingNoCompact 1
set env AUTO_REFERENCE_COUNT_LOGGING 1

And then use 'info malloc 0x2004f9340'. It'll typically show all 
CFRetain/CFRelease events.  (But not always -- there is a bug that prevents it 
from showing all of 'em.  However, ObjectAlloc works around it.)

b.bum

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to