Re: References to windows.... PLUS! I want to sleep(), was Re: Is this a useful solution to fetching a window object by name?



Yanick wrote:
You were right about the potential problems in my code (what was I
thinking ?).

Not a problem; you pretty much said yourself that it was only a quick,
rough and untested idea, designed to illustrate a principle and nothing
more. So it wasn't my intention to hold it to the same standards as
(e.g.) the Linux kernel.... I was just proving I'd actually read it :-)

Memory leaks with Javascript are easier to produce than you might
think... Here's a link that gives some explanations :
http://www.codeproject.com/jscript/LeakPatterns.asp .

Haven't had time to consider everything in the article in depth, but it
appears that one of the examples is a circular reference being missed
because it straddles the territory of the DOM garbage collector and the
Javascript one. Interesting...

Playing with server side session IDs (with the help of
XMLHttpRequests...) you could synchronize all your "registered" windows
with a server side script... Or use a frameset with a single frame
(top) to load all you different pages and keep the Javascript
environment variables in the window scope (a messy solution...).

That's the one I was thinking of, and the way I would have done it in
the first place (or at least I'd have used frames), had I not been a
complete JS newbie when I designed the code and been unable to easily
change it later.

There's no straight foreward solutions, and the language is limited in
this situation (cookies cannot store objects), you will soon find that
memory leakage and broken references (or even cyclic ones) is more an
eventuality than possibility.

I have to say that I'm always asking myself how much my frustration
with JS is down to lack of experience and how much is down to
limitations with the language. In the case of JS, it's far more
advanced than it used to be, but I'm still aware that it's a simple
scripting language with stuff added on later... not to mention issues
of compatibility and incompatibility with different browsers and older
code.

Anyway, thanks to everyone for the feedback.

Bottom line, my window-grabbing "tip" still works (if you can live with
its hackiness), but the limitations described above mean its usefulness
isn't that great for most situations. :-/


- MCh

.



Relevant Pages

  • Re: ARGOSY - HD363N - Network Storage
    ... Finally got my hands on a couple of the Argosy units recently, ... think I'm beginning to see where some of the limitations come into ... Basically these devices have to be viewed as "tape drives." ... support being what it is) Windows 95 OSR 2.1 as a dumb file ...
    (comp.sys.ibm.pc.hardware.storage)
  • Re: page size 8.5x36
    ... limitations like this just point out how much the core code of ... since the "natural" size of integers in Windows on ... I can understand Microsoft's reluctance to rewrite the core code. ... Acrobat can handle 200x200. ...
    (microsoft.public.word.pagelayout)
  • Re: Need help increasing resources
    ... My biggest problem is not knowing what limitations there may ... I've closed a few windows. ... Physical Memory ... Process Explorer from SysInternals is a good tool to analyze the load ...
    (microsoft.public.windowsxp.general)
  • Re: Ethernet Performance Testing and throughput
    ... I now use iperf in preference to ttcp since it is more flexible. ... need to happen in netperf to make it more palatable to you. ... I have always worked in MS Windows environments ... of potential bandwidth delay product limitations ...
    (comp.dcom.lans.ethernet)
  • Re: thinking about trying out linux
    ... Linux by a long shot. ... I'm not sure what you are looking for here in limitations. ... games then you may want to setup a dual boot with windows so you ... As for windows doc files there are ...
    (alt.os.linux)

Loading