< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/awt/CRobotKeyCode.m

Print this page

        

@@ -28,19 +28,12 @@
 
 @implementation CRobotKeyCodeMapping
 
 @synthesize javaToMacKeyMap;
 
-+(CRobotKeyCodeMapping *) sharedInstance {
-    static CRobotKeyCodeMapping *instance = nil;
-    static dispatch_once_t executeOnce;
-
-    dispatch_once(&executeOnce, ^{
-        instance = [[CRobotKeyCodeMapping alloc] init];
-    });
-
-    return instance;
++ (CRobotKeyCodeMapping *) sharedInstance {
+    return [[[CRobotKeyCodeMapping alloc] init] autorelease];
 }
 
 -(id) init {
     self = [super init];
 
< prev index next >