From: Patrick G. <pge...@wa...> - 2008-05-03 10:54:20
|
> > Related question: suppose I create an object that receives > NSNotifications. In the Ruby universe, I keep no pointers to it. Is it > protected from Ruby GC? I'm not sure, I've had crashes when not keeping pointers. Manually creating a window in an application controller and not keeping a pointer -> crash. Storing it as an instance or global variable -> no more crash. If you're not sure about object lifetime, call GC.start. If your code crashes right after it, it's trying to access destroyed data : keep pointers around. If it works, you're all good ! |