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 5767b1e16e
commit a8f77a9638
1 changed files with 7 additions and 3 deletions

View File

@ -59,8 +59,10 @@ public class DbSearcher
} }
/** /**
* construct method with self-define std ip2region bianry string support * construct method with self-define std ip2region binary string support
* Thanks to the issue from Wendal at https://gitee.com/lionsoul/ip2region/issues/IILFL * 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 dbConfig
* @param dbBinStr * @param dbBinStr
@ -399,7 +401,9 @@ public class DbSearcher
HeaderSip = null; //let gc do its work HeaderSip = null; //let gc do its work
HeaderPtr = null; HeaderPtr = null;
dbBinStr = null; dbBinStr = null;
if ( raf != null ) {
raf.close(); raf.close();
} }
}
} }