diff dwt/widgets/Display.d @ 104:62a654ba5276

optimation of static ctors
author Frank Benoit <benoit@tionex.de>
date Fri, 18 Jan 2008 19:13:47 +0100
parents 9f6c2c92be2b
children 5ac0a5d00e19
line wrap: on
line diff
--- a/dwt/widgets/Display.d	Fri Jan 18 17:00:39 2008 +0100
+++ b/dwt/widgets/Display.d	Fri Jan 18 19:13:47 2008 +0100
@@ -395,7 +395,8 @@
     * it does not compile on some Java compilers when they are
     * targeted for CLDC.  Use Class.forName() instead.
     */
-    synchronized static void static_this() {
+    //synchronized static void static_this() {
+    static this() {
             Displays = new Display [4];
             initDeviceFinder();
             SWT_OBJECT_INDEX = OS.g_quark_from_string ("SWT_OBJECT_INDEX");