--- a/webengine/osswebengine/WebCore/dom/EventNames.cpp Fri Jul 03 15:54:40 2009 +0100
+++ b/webengine/osswebengine/WebCore/dom/EventNames.cpp Thu Aug 27 07:44:59 2009 +0300
@@ -35,9 +35,10 @@
DEFINE_GLOBAL(AtomicString, name##Event, #name)
DOM_EVENT_NAMES_FOR_EACH(DEFINE_EVENT_GLOBAL)
+static bool initialized = false;
+
void init()
{
- static bool initialized;
if (!initialized) {
// Use placement new to initialize the globals.
@@ -48,4 +49,16 @@
}
}
+void remove()
+{
+ if( initialized ) {
+ #define DESTROY_GLOBAL(name) delete ((AtomicString*)&name##Event)->impl();
+ DOM_EVENT_NAMES_FOR_EACH(DESTROY_GLOBAL)
+ AtomicString::remove();
+
+ initialized = false;
+ }
+
+} //remove()
+
} }