CIFilter does not strongly reference its name, resulting in crash when using garbage collection
CIFilter does not strongly reference its name, resulting in crash when using garbage collection
- Subject: CIFilter does not strongly reference its name, resulting in crash when using garbage collection
- From: Michal Antonic <email@hidden>
- Date: Fri, 9 Jul 2010 03:50:20 +0200
Hi,
it seems to me that CIFilter does not strongly reference its own name. When using garbage collection, sometimes the name gets collected prematurely, resulting in crashes.
This problem manifests itself perhaps most clearly when trying to use a CIFilter that has been encoded to XIB and then decoded.
Using the debugger just after decoding from XIB gets me this:
(gdb) info gc-roots (void*)[filter name]
Number of roots: 0
(gdb) info gc-roots filter
Number of roots: 3
[filter name] has no references, but filter has 3. This seems like a bug, as it leads to crashes and CIFilter should clearly own its name. I filed a bug for this with ID 8173658.
Are there any bullet-proof workarounds, aside from not encoding the CIFilter at all, but instead creating it programmatically and referencing its name object from elsewhere?
Miso_______________________________________________
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