| Reply | « Previous Thread | Next Thread » |
|
Hi,
I just remarked something, in my game I'm open and close a recordstore just like this try { RecordStore r = RecordStore.openRecordStore(name,true); r.closeRecordStore(); r=null; System.gc(); } If I watch the free heap mem in the status window of the s40 emulator I see a difference of about 8k between the higher free mem value if I do the above code and the higher free mem value if I do not execute it... How can this be ? Why does the mem not released ? thanks |
| FatalError |
| View Public Profile |
| Find all posts by FatalError |
|
same problem here,
my Code: public static void loadRecordStore() { ByteArrayInputStream is = null; DataInputStream ds = null; RecordStore rs = null; try { rs = RecordStore.openRecordStore("OPTIONS", false); byte[] buff = rs.getRecord(1); is = new ByteArrayInputStream(buff); ds = new DataInputStream(is); try { // read int and boolean } catch(IOException e) { System.out.println("Error occured in loadRecordStore: " + e); } } catch(RecordStoreException e) { System.out.println("RecordSet doesn't exist in loadRecordStore: " + e); } finally { try { if(is!=null) is.close(); if(ds!=null) ds.close(); if(rs!=null) rs.closeRecordStore(); } catch(Exception e) { System.out.println("Error occured in loadRecordStore: " + e); } } } openRecordStore takes 5k heap, still after this function. Greetings, S. Schmid |
| Spider@Nokia |
| View Public Profile |
| Find all posts by Spider@Nokia |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|