Thursday, January 4th, 2007
- Avoid Closures if Possible. What happens when [a closure registered as an event listener] never fires? We expect it to, but it might not. If it doesn’t fire, the closure [may have] a reference to [a] source object and the source object back to the closure. This is an implicit circular reference, hard to spot, and IE leaks memory. This is never good for performance.
- Donâ€™t use Property Accessor Functions. A common technique in object oriented programming is to use property accessor functions… in the form of [get/set]_PropertyName (or many others depending on the style)… [This makes for] terrible JScript.
Posted by Ben Galbraith at 11:54 pm