October 20, 2005 Javascript closures can be a powerful programming technique. Unfortunately in Internet Explorer they are a common source of memory leaks. Therefore I propose a method to create closures that don't leak memory. Problem First start with a short explanation of the problem I tried to fix. Here is an example of a simple event handler (IE only for clarity): function attach() {
 
    ![[IE] Javascript で動的にイベントを登録するとメモリリークが発生](https://cdn-ak-scissors.b.st-hatena.com/image/square/50a62e5e1b1c0889cadac97e7ee767f219883893/height=288;version=1;width=512/https%3A%2F%2Fsupport.office.com%2FSocImages%2FSOC_SharingImage_720x405.png) 
       
      

