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


Groups > comp.lang.javascript > #23964 > unrolled thread

Might this leak memory or be otherwise bad?

Started byDr J R Stockton <reply1400@merlyn.demon.co.uk.invalid>
First post2014-04-26 16:47 +0100
Last post2014-04-26 16:47 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.javascript


Contents

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

#23964 — Might this leak memory or be otherwise bad?

FromDr J R Stockton <reply1400@merlyn.demon.co.uk.invalid>
Date2014-04-26 16:47 +0100
SubjectMight this leak memory or be otherwise bad?
Message-ID<F5r31UUHU9WTFwUB@invalid.uk.co.demon.merlyn.invalid>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web