Changeset 21912

Show
Ignore:
Timestamp:
20.04.2010 10:46:43 (9 years ago)
Author:
xiao
Message:

force garbage collection after closing gdb database on Windows

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GDBMWrapper.java

    r18663 r21912  
    131131    try { 
    132132      if (db_ != null) { 
    133     db_.close(); 
    134     db_ = null; 
     133       db_.close(); 
     134       db_ = null; 
     135        if(System.getProperty("os.name").startsWith("Windows")) { 
     136            //Hack: force Windows to let go of the gdb file 
     137            System.gc(); 
     138        } 
    135139      } 
    136140    } catch (GdbmException e) {