NSTokenField memory management issue
NSTokenField memory management issue
- Subject: NSTokenField memory management issue
- From: Dan Treiman <email@hidden>
- Date: Sat, 22 May 2010 15:29:42 -0500
I have a cocoa app which changes the content of a window as you navigate, similar to a web browser. This app is compiled using gc required. Everything is fine unless my NSTokenField subclass is displayed, in which case the entire view hierarchy remains rooted and does not get garbage collected.
I'm using NSRoundedTokenStyle, and my best guess is that the tokens are registered somewhere to track the mouse? Why else would they be rooted? Anyway, does anybody have any insight or any suggestions on how to work around this?
thanks!
- Dan Treiman
(gdb) info gc-roots 0x20073ff80
Number of roots: 3
Root:
0 Kind: bytes rc: 1 Address: 0x00000002011a6960
1 Kind: bytes rc: 0 Address: 0x00000002011a6ee0 Offset: 0x0000000000000050
2 Kind: object rc: 0 Address: 0x000000020086bc60 Offset: 0x0000000000000020 Class: NSTokenAttachment
3 Kind: object rc: 0 Address: 0x000000020070e220 Class: NSTokenFieldCell ivar: NSTextFieldCell.NSActionCell._controlView
4 Kind: object rc: 0 Address: 0x0000000200726c40 Class: GSAttributeTokenField ivar: NSTokenField.NSTextField.NSControl.NSView.NSResponder._nextResponder
5 Kind: object rc: 0 Address: 0x000000020073bcc0 Class: NSView ivar: NSResponder._nextResponder
6 Kind: object rc: 0 Address: 0x00000002007eb000 Class: NSTabView ivar: _delegate
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden