You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All observed elements are being pushed to the CACHE array. This array is used only on IE to be able to clean up the event listeners in the _destroyCache method, which is called upon window.onunload. This patch puts an if (Prototype.Browser.IE) around the invocation of CACHE.push(element); to save some memory on other browsers.
This ticket is related to #466 (Suppress memory leaks from Element.remove and Elemen.update).
The text was updated successfully, but these errors were encountered:
ronin-93814 (at lighthouseapp)
April 7th, 2010 @ 10:43 AM
From e795810fd997514b8e6ebd77972291308536f882 Mon Sep 17 00:00:00 2001
From: Jochen Berger <fooberger@googlemail.com>
Date: Wed, 7 Apr 2010 10:36:19 +0200
Subject: [PATCH] Only push observed elements to the CACHE if on IE
---
src/dom/event.js | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/dom/event.js b/src/dom/event.js
index 6efac7d..1a18265 100644
--- a/src/dom/event.js+++ b/src/dom/event.js@@ -423,8 +423,10 @@
var registry = Element.retrieve(element, 'prototype_event_registry');
if (Object.isUndefined(registry)) {
- // First time we've handled this element. Put it into the cache.- CACHE.push(element);+ if (Prototype.Browser.IE) {+ // First time we've handled this element. Put it into the cache.+ CACHE.push(element);+ }
registry = Element.retrieve(element, 'prototype_event_registry', $H());
}
--
1.6.3.3
previous lighthouse ticket #1025
by ronin-93814 (at lighthouseapp)
All observed elements are being pushed to the CACHE array. This array is used only on IE to be able to clean up the event listeners in the _destroyCache method, which is called upon window.onunload. This patch puts an if (Prototype.Browser.IE) around the invocation of CACHE.push(element); to save some memory on other browsers.
This ticket is related to #466 (Suppress memory leaks from Element.remove and Elemen.update).
The text was updated successfully, but these errors were encountered: