-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugIt is confirmed a bug, but don't worry, we'll handle it.It is confirmed a bug, but don't worry, we'll handle it.
Description
Go version
1.22
GoFrame version
2.7.4
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
package main
import (
_ "net/http/pprof"
"context"
"log"
"math"
"net/http"
"time"
"github.com/gogf/gf/v2/os/gcache"
)
func main() {
go func() {
log.Println(http.ListenAndServe("localhost:18888", nil))
}()
ctx := context.Background()
cacher := gcache.New(10000)
for i := 0; i < math.MaxInt; i++ {
_ = cacher.Set(ctx, i, i, 0)
time.Sleep(time.Microsecond)
}
log.Println("done")
}
watch with monitor or use go pprof
What did you see happen?
memory leak
What did you expect to see?
stable memory usage
Metadata
Metadata
Assignees
Labels
bugIt is confirmed a bug, but don't worry, we'll handle it.It is confirmed a bug, but don't worry, we'll handle it.