[Proto-Scripty] Re: Deleting a class object releasing the memory.

2010-10-25 Thread jose maria Cano
Hi again, Thanks a lot for your time and help. But still something that I can't understand. The property object options has 3 variables inside: this.options = { vari: '', array: '', testDiv: '' }; What I can't understand is that for "vari" and "testDi

[Proto-Scripty] Re: Deleting a class object releasing the memory.

2010-10-25 Thread T.J. Crowder
Hi, > So, why is deleting this variable and not the array? it sounds very > strange for me. Again, in my tests using a real browser and looking at the memory used by the browser as reported by the operating system, the memory used by the elements in the array _is_ getting released, over time, and

[Proto-Scripty] Re: Anchor button triggers window.onbeforeunload in IE

2010-10-25 Thread Eric
Hi JoJo, It seems you're doing a closure "by hand". You may want to look at Function.bind() or Function.curry() in prototype documentation, since they do it for you. Your solution may become : dynamicAnchor = new Element( 'a', { href: 'javascript:void(0)' } ).observe( 'click',

[Proto-Scripty] Re: Deleting a class object releasing the memory.

2010-10-25 Thread Paco Gómez
Hi TJ, I'm Jose's partner. The thing I don't understand is why we can recover memory after creating any other kind of object, but not with DOM elements. For example, this memory is recovered after destroying the object: (http://pastie.org/1247004) var TestClass = Class.create({ initialize: fun

[Proto-Scripty] Re: Anchor button triggers window.onbeforeunload in IE

2010-10-25 Thread T.J. Crowder
Hi, On Oct 22, 7:47 pm, JoJo wrote: > Thanks T.J. > > The solution is: > ... FWIW, it's a bit off-topic, but regarding your code where you're defining and then calling a function: function(parameter) { // ... }(localVariable) To ensure that that works reliably across implementa

[Proto-Scripty] Re: Anchor button triggers window.onbeforeunload in IE

2010-10-25 Thread T.J. Crowder
@JoJo: I start this off responding to Eric, but there's some info (useful, I hope) for you below as well. @Eric: > T.J.'s blog has many very well written articles that will explain you > why... You're very kind!! :-) > Also note that I am 80% sure (please somebody confirm) that since your > pa

[Proto-Scripty] Re: Deleting a class object releasing the memory.

2010-10-25 Thread T.J. Crowder
Hi, > Do you have any idea why is this happening? Well, assuming it _is_ actually happening as opposed to being a measurement error, I'm afraid not. The thing (again) that I'm not sure Jose was really clear on was that memory will NOT be freed immediately just because you stopped referencing it,

[Proto-Scripty] How tied to HTML is Protoype?

2010-10-25 Thread Gregory Seidman
I've been doing a lot with SVG recently, and for now I've been embedding the SVG in XHTML. I'm considering moving to straight SVG, however, but I want to keep using Prototype (I don't care about Scripty for this). Does anyone know of anything that is HTML-specific in Prototype? Remember that SVG s