Skip to content

Addressing strange memory leak #59

Open
@gonejack

Description

@gonejack

go-generics-cache/cache.go

Lines 277 to 279 in 2601bb0

if item.hasExpiration() {
c.expManager.update(key, item.Expiration)
}

After some pprof job, I believe this line make memory leaks as this would not checking lru cache capacity before doing heap push.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions