Reviewed by Tim Hatcher.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Jul 2006 08:36:57 +0000 (08:36 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Jul 2006 08:36:57 +0000 (08:36 +0000)
        - fix 20 Node leaks on fast/events tests - these should be the last ones

        * bindings/objc/DOMEvents.mm:
        (-[DOMEvent dealloc]): implement - deref the event!
        (-[DOMEvent finalize]): ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15198 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/bindings/objc/DOMEvents.mm

index bdfd30a92865b983f84618d29e6aaf4c00d2e191..fa0d07c4fadf382486229387c8ca51c9e18a4f62 100644 (file)
@@ -1,3 +1,13 @@
+2006-07-07  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Tim Hatcher.
+
+        - fix 20 Node leaks on fast/events tests - these should be the last ones
+
+        * bindings/objc/DOMEvents.mm:
+        (-[DOMEvent dealloc]): implement - deref the event!
+        (-[DOMEvent finalize]): ditto
+
 2006-07-06  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Tim Hatcher.
index f9a548f849af6a9771abfe9c8a3bb421c58010f3..320bbdce70a758d06c6b7287222738d3dd3232be 100644 (file)
@@ -146,6 +146,21 @@ ALLOW_DOM_CAST(Event)
     return [[[wrapperClass alloc] _initWithEvent:impl] autorelease];
 }
 
+- (void)dealloc
+{
+    if (_internal)
+        DOM_cast<Event *>(_internal)->deref();
+    [super dealloc];
+}
+
+- (void)finalize
+{
+    if (_internal)
+        DOM_cast<Event *>(_internal)->deref();
+    [super finalize];
+}
+
+
 @end
 
 @implementation DOMKeyboardEvent