fix the bug of raf=null in the close interface of DbSearcher

This commit is contained in:
lionsoul
2019-07-07 11:09:48 +08:00
parent 8436adb45f
commit ebea2a1467
@@ -59,8 +59,10 @@ public class DbSearcher
}
/**
* construct method with self-define std ip2region bianry string support
* Thanks to the issue from Wendal at https://gitee.com/lionsoul/ip2region/issues/IILFL
* construct method with self-define std ip2region binary string support
* Thanks to the issue from Wendal at https://gitee.com/lionsoul/ip2region/issues/IILFL.
*
* Note: This construtor should be used for memory search ONLY !!!
*
* @param dbConfig
* @param dbBinStr
@@ -399,7 +401,9 @@ public class DbSearcher
HeaderSip = null; //let gc do its work
HeaderPtr = null;
dbBinStr = null;
raf.close();
if ( raf != null ) {
raf.close();
}
}
}