Allison Newman
demal****@mac*****
Sat Apr 25 00:15:17 JST 2009
Brian, >NSManagedObjects (created when Core Data objects are fetched from >disk) do fail, but - in the case that led me down the path to this >mail - don't fail until after something like 17 extractions from an >NSArray. But it would take a bigger program to show that. > > Do you have any code you can share that shows this bug? The first example you posted just shows what I said in my second message, specifically that NSCFXxxxxxx-based objects are not cached. // We don't cache CF-based objects because we don't have yet a reliable // way to remove them from the cache. On the other hand, your problem with NSManagedObject seems to be coming from somewhere else. I haven't been able to reproduce it on my system. >> 2) If you remove the to_ns in make_array, everything works just fine. > >Yes. In that case, each array element has a pointer to it from "the >Ruby universe", so each of their Ruby proxies / Ruby halves stays >around to be returned by each(). The to_ns makes the array elements >have no Ruby objects pointing to them. So RubyCoca [I believe] can >create a new proxy each time each() returns a particular Objective-C >object. Yes :-) Sorry, I was just double-checking for myself that that part of the system was working as expected, something I do when someone shows me a bug: start by verifying that the bits you think you understand do what you are actually expecting, before you start trying to guess what is happening in the black boxes that you don't understand...