From: Tim Meyer (meyerti_at_gmail.com)
Date: Mon Feb 21 2011 - 09:13:18 CST

dear all,
in a former thread a memory leak was reported (and reported fixed)
http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/16658.html

running a small skript analyzing waters in a trajectory where i loop for each
frame through all ~1000 water molecules (see below) does however accumulate
memory (version 1.8.7 and 1.9b1) and leads to a crash after ~20 frames (1.5GB of
RAM)
i tried to free memory using "unset s" didn't seem to work.
any suggestions on how to free memory within the loop?

thanks in advance

tim

mol addfile TRAJ/1cqy.1.netcdf type netcdf first 0 last 999 step 1 waitfor -1
set wat [atomselect top "water and oxygen"]
mol representation vdw
mol addrep top
set num_frame [molinfo top get numframes]
puts "have $num_frame frames"
for { set frame 0 } { $frame < $num_frame } {incr frame} {
   animate goto $frame
   puts $frame
   foreach inx [$wat list] {
     set s [atomselect top "noh and within 3.5 of index $inx"]
   }
}