-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'where' method is modifying the receiver #66
base: master
Are you sure you want to change the base?
Conversation
Are you using the ArrayModelAdapter? |
Yes, it is with ArraymodelAdapter. Found this issue while wanting to reload a UITableView based on some filter criteria. We were passing the collection (the value returned by task.assignees for example). Found out this issue of the collection being set to the return value of the where function. Strangely this issue happens only when assigning the collection to a variable and works fine for task.assignees.where(:name).eq("Assignee 1") # doesn't modify task.assignees |
|
This worries me ever so slightly as it relies in GC to clean up. Is there a way to monitor its life cycle and release manually, so as to be a good citizen? Sent from my iPhone On Jul 2, 2013, at 7:52 AM, Doug Puchalski [email protected] wrote:
|
Not sure who you're asking, or to work around such a fundamental flaw in RM... but the alternative might be to just not modify the collection in ArrayFinderQuery, no? |
Asking anyone/everyone participating in this issue. GC in Ruby is pretty iffy and Rails suffered from memory bloat for a long time before they went on a real hard-core diet. But with Rails you can always throw more iron at the problem. Not so with iOS apps. On the other side of this is the fact that although it's a pain to do, we can explicitly retain and release stuff even though it makes things difficult to debug. Is it worth it? Am I solving a problem that doesn't exist? On Jul 2, 2013, at 11:43 AM, Doug Puchalski [email protected] wrote:
|
I feel like if we're worried about RM not disposing of objects, there are bigger fish to fry across the entire library, and apps in general. Any reason you're worried about this specific example? On Jul 2, 2013, at 12:27 PM, "s.ross" [email protected] wrote:
|
Yeah, probably best to watch usage and see what the RM-3 fix does for us. On Jul 2, 2013, at 5:34 PM, Doug Puchalski [email protected] wrote:
|
The 'where' method in has_many relation is modifying the receiver in a special case