The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/internal/memprofiling/singleton.go

14 lines
250 B

package memprofiling
import "sync"
var singleton *MemProfiling
var once sync.Once
// GetMemProfiling returns a pointer of MemProfiling.
func GetMemProfiling() *MemProfiling {
once.Do(func() {
singleton = &MemProfiling{}
})
return singleton
}