> That's a sneaky one, I bet lots of people get bit.
> Is there any real need for prevObject?

It's used to implement .end() for (un)chaining, so it's definitely
needed.

I agree it's tricky, though. When the result of the chain isn't being
assigned to anything, the .prevObject reference (and that object's DOM
object references) would be garbage collected. The trouble starts when
you save the "middle" or "end" of a chain to a variable. Even then, it
only gets bad when the DOM elements referenced in .prevObject are
expected to go away, like this case.

It probably would be a good idea to have a core method to null
out .prevObject, which would provide a convenient place to discuss the
issue and provide examples of what (not) to do. Perhaps .unchain()?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to