UF (Use Freed) issues are reported when there is an attempt to use resources after they were released. The ANDROID.UF.MEDIAPLAYER warning indicates an attempt to use MediaPlayer after it was released.

Example 1

     public boolean onKeyDown(final int keyCode, final KeyEvent event) {
         if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
             MediaPlayer mp = new MediaPlayer();
             try {
             } catch (IOException e) {
             return true;
         return super.onKeyDown(keyCode, event);

ANDROID.UF.MEDIAPLAYER is reported for the snippet on line 35 since there is an attempt to use the 'mp' that is released in case of IOException on line 33.


This checker can be extended through the Klocwork knowledge base. See Tuning Java analysis for more information.