close levigo.Read/WriteOptions

master
Oliver Tonnhofer 2013-11-19 15:07:26 +01:00
parent 95aa490208
commit b86ecff037
1 changed files with 9 additions and 0 deletions

9
cache/osm.go vendored
View File

@ -178,6 +178,14 @@ func idFromKeyBuf(buf []byte) int64 {
}
func (c *cache) Close() {
if c.ro != nil {
c.ro.Close()
c.ro = nil
}
if c.wo != nil {
c.wo.Close()
c.wo = nil
}
if c.db != nil {
c.db.Close()
c.db = nil
@ -186,4 +194,5 @@ func (c *cache) Close() {
c.cache.Close()
c.cache = nil
}
}