# IE crashing after about 70 open/close event

**URL:** <https://www.ruby-forum.com/t/ie-crashing-after-about-70-open-close-event/173174>\
**Category:** Ruby\
**Created:** [August 4, 2009, 1:13pm UTC](https://www.ruby-forum.com/t/ie-crashing-after-about-70-open-close-event/173174 "2009-08-04T13:13:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebeis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@sebeis](https://www.ruby-forum.com/u/sebeis)\
**Post date:** [August 4, 2009, 1:13pm UTC](https://www.ruby-forum.com/t/ie-crashing-after-about-70-open-close-event/173174/1 "2009-08-04T13:13:57Z")

</div>

Hi,

I have to open links (about 3000) and then close them.  
The problem is, that after 70 open/close event the IE (FF not supported  
in our WebServer) crashes, stuck in memory and the script collapses.

The script:

def link\_clicker()  
if $br.frame(…).exists? then  
$br.frame(…).lis.each do |linke|  
linke.click  
$br\_new = Watir::IE.attach(:url,linke.href)  
if not $br\_new.pageContainsText(text) then  
puts “No match” #only debug feature  
end  
$br\_new.close  
end  
else puts “Doesn’t find list!”  
end  
end

Any ideas how to solve the problem, please?  
Thank you

SebeIs
