Reviewed by Tim Hatcher.
[WebKit-https.git] / WebCore / bindings / objc / DOMEvents.mm
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