javaextensions/location/landmarks/src/landmark.cpp
branchRCL_3
changeset 24 6c158198356e
parent 17 0fd27995241b
equal deleted inserted replaced
23:e5618cc85d74 24:6c158198356e
   455         aJniEnv->DeleteGlobalRef(arrayRef);
   455         aJniEnv->DeleteGlobalRef(arrayRef);
   456     }
   456     }
   457     return error;
   457     return error;
   458 }
   458 }
   459 
   459 
       
   460 LOCAL_C void dispose(CBase* aLandmark)
       
   461 {
       
   462     delete aLandmark;
       
   463 }
       
   464 
   460 /*
   465 /*
   461  * Class:     javax_microedition_location_Landmark
   466  * Class:     javax_microedition_location_Landmark
   462  * Method:    _dispose
   467  * Method:    _dispose
   463  * Signature: (II)V
   468  * Signature: (II)V
   464  */
   469  */
   465 JNIEXPORT void
   470 JNIEXPORT void
   466 JNICALL Java_javax_microedition_location_Landmark__1dispose(
   471 JNICALL Java_javax_microedition_location_Landmark__1dispose(
   467     JNIEnv* /*aJniEnv*/,
   472     JNIEnv* /*aJniEnv*/,
   468     jobject /*aPeer*/,
   473     jobject /*aPeer*/,
   469     jint /*aEventSourceHandle*/,
   474     jint aEventSourceHandle,
   470     jint aLandmarkHandle)
   475     jint aLandmarkHandle)
   471 {
   476 {
   472     JELOG2(EJavaLocation);
   477     JELOG2(EJavaLocation);
   473 
   478     LocationFunctionServer* eventSource =
       
   479         reinterpret_cast< LocationFunctionServer*>(aEventSourceHandle);
       
   480     
   474     CBase* object = reinterpret_cast< CBase*>(aLandmarkHandle);
   481     CBase* object = reinterpret_cast< CBase*>(aLandmarkHandle);
   475 
   482     eventSource->ExecuteTrap(dispose,object);
   476     delete object;
       
   477 }
   483 }
   478 
   484 
   479 // End of file
   485 // End of file