Hi guys,
I have a big problem in my application, when I create a global class
object is impossible for me to release the memory and I'm having
memory leaks.
I've made a small class as example.
var TestClass = Class.create({
initialize: function() {
this.options = {
Hi,
See the documentation for `Event.observe`[1] (which is what you're
calling indirectly from the `Element#observe` function), specifically
the Preventing the Default Event Action and Bubbling part, and the
`Event` object[2]: You don't return false to cancel the `click` event,
you use the
Hi,
I have a big problem in my application, when I create a global class
object is impossible for me to release the memory and I'm having
memory leaks.
It looks to me like you're doing nearly everything you need to do (and
a little bit more). Remember that all you can do is make sure that
On Oct 21, 2010, at 6:32 PM, T.J. Crowder wrote:
Instead, I'd do it in the obvious place: The form submit event:
http://jsbin.com/aniro4/3 Or you could do it on the `click` event of
the button: http://jsbin.com/aniro4/4 (I wouldn't use `mouseup` on the
button, in case there are things the user
Hi,
First of all, thanks a lot for your time and help.
I forgot to say that the problem is using windows and IE8 (of course…)
but I have to support IE for some clients.
Also, the class is a test class, is not doing anything “useful”, is
just to see how to release the memory in IE, the real
Hi,
Sorry, all of the numbers in my original post are off by 1,000. I was
writing 32k when I should have been writing 32,000k (or ~31M).
Sorry about that, misread the Chrome memory page and failed to
think. :-)
But the problem is still there, I don’t know how to release the memory
used by
Hi,
Yeah, changes to the DOM that's being torn down are probably pretty
low priority.
If you really, really want to do this, I'd probably do a lib that:
1. Dynamically replaces the type='submit' buttons with type='button'
buttons.
2. Watches for clicks on them.
3. In the click handler, do
It looks like TJ got you an answer, but do you also realize that there
is a typo in the snippet you posted here?
hashBrown.length=0 and hashBrown.clear().
***hashBown***.each(function(key) {
hashBrown.unset(key);
});
hashBown - hashBrown (missing 'r')
-K
On Oct 20, 10:39
Hey Folks -
So I have a situation that I think a lot of us are in that I want to
see if I can plan for. So, IE9 is probably going to be released
before the production version of Scripty2. And I have a few (in
production) web apps that run on Script.aculo.us. Prototype is
adding in IE9 support
Thanks T.J.
The solution is:
dynamicAnchor = new Element(
'a', {
href: 'javascript:void(0)'
}
).observe(
'click',
function(parameter) {
return function(event) {
window.status = parameter;
Event.stop(event);
}
}(localVariable)
);
10 matches
Mail list logo