diff --git a/src/macosx/native/sun/awt/CMenuComponent.m b/src/macosx/native/sun/awt/CMenuComponent.m index 901de7e337557a5f6110e4ddf471ba3241051262..6847f9bd799583453d6bd5ca2025b5d92b850c67 100644 --- a/src/macosx/native/sun/awt/CMenuComponent.m +++ b/src/macosx/native/sun/awt/CMenuComponent.m @@ -41,45 +41,11 @@ return self; } --(void) cleanup { - // Used by subclasses -} - --(void) disposer { +-(void) dealloc { JNIEnv *env = [ThreadUtilities getJNIEnvUncached]; JNFDeleteGlobalRef(env, fPeer); fPeer = NULL; - [self cleanup]; - [self release]; -} - -// The method is used by all subclasses, since the process of the creation -// is the same. The only exception is the CMenuItem class. -- (void) _create_OnAppKitThread: (NSMutableArray *)argValue { - jobject cPeerObjGlobal = (jobject)[[argValue objectAtIndex: 0] pointerValue]; - CMenuItem *aCMenuItem = [self initWithPeer:cPeerObjGlobal]; - [argValue removeAllObjects]; - [argValue addObject: aCMenuItem]; + [super dealloc]; } - @end - -/* - * Class: sun_lwawt_macosx_CMenuComponent - * Method: nativeDispose - * Signature: (J)V - */ -JNIEXPORT void JNICALL -Java_sun_lwawt_macosx_CMenuComponent_nativeDispose -(JNIEnv *env, jobject peer, jlong menuItemObj) -{ -JNF_COCOA_ENTER(env); - - [ThreadUtilities performOnMainThread:@selector(disposer) - on:((id)jlong_to_ptr(menuItemObj)) - withObject:nil - waitUntilDone:NO]; - -JNF_COCOA_EXIT(env); -}