ttacon/libphonenumber

init function causes memory leak.

cheikhshift opened this issue · 0 comments

Here is some information from pprof :

.../vendor/github.com/ttacon/libphonenumber.init.4 in .../vendor/github.com/ttacon/libphonenumber/phonenumberutil.go
0 1.01MB (flat, cum) 100% of Total
. . 3253: }
. . 3254: return metadata.GetMobileNumberPortableRegion()
. . 3255:}
. . 3256:
. . 3257:func init() {
. 1.01MB 3258: err := loadMetadataFromFile("US", 1)
. . 3259: if err != nil {
. . 3260: // better to die on start up
. . 3261: panic(err)
. . 3262: }