Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

UF.MICRO

UF (Use Freed) issues are reported when there is an attempt to use resources after they were released. The UF.MICRO warning indicates an attempt to use Java Micro Edition object after it was closed.

Example 1

20     class DBTestMidlet extends MIDlet {
21 
22         private Display display;
23         private int nextRecordId;
24 
25         public DBTestMidlet() {
26             display = Display.getDisplay(this);
27 
28             RecordStore store = null;
29             try {
30                 store = RecordStore.openRecordStore("TestStore", true);
31                 nextRecordId = store.getNextRecordID();
32             } catch (RecordStoreException e) {
33                 handleException(e);
34                 if (store != null) {
35                     try {
36                         store.closeRecordStore();
37                     } catch (RecordStoreException e1) {
38                         // ignore
39                     }
40                 }
41             }
42 
43             try {
44                 final String name = store.getName();
45                 display.setCurrent(new TextBox("", "Connected to database: " + name, 6000, TextField.ANY));
46             } catch (Exception e) {
47                 handleException(e);
48             }
49         }
50 
51         private void handleException(Exception e) {
52             display.setCurrent(new TextBox("Error", e.toString(), 60000, TextField.ANY));
53         }
54 
55         public void startApp() {
56         }
57 
58         public void pauseApp() {
59         }
60 
61         public void destroyApp(boolean unconditional) {
62         }
63     }

UF.MICRO is reported for the snippet on line 44: There is attempt to get the name of the Java Micro Edition record store which is closed on line 36 in case if RecordStoreException is thrown on line 31.