auto close the handle after buffer loaded
This commit is contained in:
parent
8f236b5a8a
commit
0856b034bc
|
|
@ -267,7 +267,9 @@ class XdbSearcher
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::loadHeader($handle);
|
$header = self::loadHeader($handle);
|
||||||
|
fclose($handle);
|
||||||
|
return $header;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load vector index from a file handle
|
// load vector index from a file handle
|
||||||
|
|
@ -296,7 +298,9 @@ class XdbSearcher
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::loadVectorIndex($handle);
|
$vIndex = self::loadVectorIndex($handle);
|
||||||
|
fclose($handle);
|
||||||
|
return $vIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the xdb content from a file handle
|
// load the xdb content from a file handle
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue