Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #23964

Might this leak memory or be otherwise bad?

From Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid>
Newsgroups comp.lang.javascript
Subject Might this leak memory or be otherwise bad?
Date 2014-04-26 16:47 +0100
Organization Home
Message-ID <F5r31UUHU9WTFwUB@invalid.uk.co.demon.merlyn.invalid> (permalink)

Show all headers | View raw


I have a page with buttons that create new windows with content, and
that content includes buttons which rewrite the content of their windows
by assigning to document.body.innerHTML.  Each content displays some
text and buttons and a different image, typically but not always a
640*480 JPG.  There could be up to 2000 rewrites without repeating an
image.  Sometimes, there is a little HTML text instead of the image.

If that can do anything bad, or even if not, how can the code be
improved?

There is a short demo at <http://www.merlyn.demon.co.uk/$1.htm>, with
the image files missing.

Just to stop you all asking, the code contains a reference to El.texxt,
which will be undefined.  It is there to remind me that I previously
used El.text and might want to revert.  The loading time that it wastes
is insignificant.

-- 
 (c) John Stockton, nr London, UK.  Mail via homepage.  Turnpike v6.05  MIME.
  Web  <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms and links;
  Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc.
  No Encoding. Quotes before replies. Snip well. Write clearly. Mail no News.

Back to comp.lang.javascript | Previous | Next | Find similar | Unroll thread


Thread

Might this leak memory or be otherwise bad? Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-04-26 16:47 +0100

csiph-web