I'm quoting Mike Alsup from the jQuery 1.1.2 thread, which I thought did a
good job relating to this question:
Based on this info, I feel totally safe using it.  I can't even think of a
reason to use objects in this way, but I am not that complex. :)

*That's correct.  It's safe to store primitives in an expando because
the aren't reference counted for garbage collection.  But objects are
trouble.  An IE memory leak pattern is as simple as this:

var o = document.getElementById('A');
document.getElementById('A').myprop = o;

Jack Slocum has a good blog entry on avoiding memory leaks:

**
http://www.jackslocum.com/blog/2006/10/02/3-easy-steps-to-avoid-javascript-memory-leaks/
*<http://www.jackslocum.com/blog/2006/10/02/3-easy-steps-to-avoid-javascript-memory-leaks/>


*Mike*
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to