I was looking for a solution to the same problem. I read this thread and others, and I believe I found a solution here:

http://ajaxian.com/archives/dynamic-script-generation-and-memory-leaks

I...