oschwald / maxminddb-golang

MaxMind DB Reader for Go
ISC License
597 stars 101 forks source link

os.Close call #12

Closed sundarv85 closed 9 years ago

sundarv85 commented 9 years ago

Hello,

A newbie question:

https://github.com/oschwald/maxminddb-golang/blob/master/reader_other.go

In this, I see an os.Open call fd, which is then used for mmap. However, I don’t see an os.Close call. Is that not needed.

Thanks Sundar.

oschwald commented 9 years ago

The file handle is closed here. It doesn't need to remain open after the the file is mmap'd.