Re: JavaScript closures article
- From: -Lost <maventheextrawords@xxxxxxxxxx>
- Date: Thu, 28 Jun 2007 15:59:44 -0400
Manish Tomar wrote:
Hi,
Please check this small article on my experience on closures in
JavaScript.
http://manishtomar.blogspot.com/2007/04/javascripts-power-of-closure.html
It gives a simple explanation of closures. Do post any comments if you
like it.
Um, personally, I found this article poorly-worded, not well written and *very* unprofessional. I doubt many will take this article seriously.
Not to mention your code clutters the global namespace (the Window object). And I could be wrong, but I see a memory leak in the making. Not by the circular reference, but by nesting closures. (See MDC link below.) Also, I am quite certain that function (createFuncs) could be written more simply and possibly more efficiently. See:
http://developer.mozilla.org/en/docs/A_re-introduction_to_JavaScript#Closures
I will continue to use these professionally written documents on closures (and memory leakage):
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Functions#Nested_functions_and_closures
http://developer.mozilla.org/en/docs/A_re-introduction_to_JavaScript#Memory_leaks
http://jibbering.com/faq/faq_notes/closures.html
http://www.codeproject.com/jscript/LeakPatterns.asp
--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am kidding. No I am not.
.
- References:
- JavaScript closures article
- From: Manish Tomar
- JavaScript closures article
- Prev by Date: Re: get characters before and after "token"?
- Next by Date: Function Format Question!
- Previous by thread: JavaScript closures article
- Next by thread: get characters before and after "token"?
- Index(es):
Relevant Pages
|