Hi,
I have an ivar in AppController, a pointer to the class Volume.
When running info gc-roots on it before setting it nil, the results are:

(gdb) info gc-roots 0x2004f9340
Number of roots: 40
Root:
0 Kind: bytes rc: 1 Address: 0x0000000200543b40 Offset: 0x0000000000000008
   1 Kind: object  rc:   0  Address: 0x00000002004f9340  Class: Volume
Root:
0 Kind: stack rc: 0 Address: 0x00007fff5fbfeab0 Frame level: 1 Symbol: <unknown> 1 Kind: object rc: 0 Address: 0x000000020015d000 Class: AppController ivar: selectedPTVolume
   2 Kind: object  rc:   0  Address: 0x00000002004f9340  Class: Volume
.
.
.
and 38 more, most with rc: 0.

When I set this ivar to nil. the results are:

(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

When I try to run info gc-roots on the first entry, the results are:

(gdb) info gc-roots 0x0000000200543b40
Number of roots: 1
Root:
   0 Kind: bytes   rc:   1  Address: 0x0000000200543b40

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)?

Wishes,
Nick

_______________________________________________

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