mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 00:11:56 +03:00
Can correctly accept faketls messages
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package record
|
||||
|
||||
import "sync"
|
||||
|
||||
var recordPool = sync.Pool{
|
||||
New: func() interface{} {
|
||||
return &Record{}
|
||||
},
|
||||
}
|
||||
|
||||
func AcquireRecord() *Record {
|
||||
return recordPool.Get().(*Record)
|
||||
}
|
||||
|
||||
func ReleaseRecord(r *Record) {
|
||||
r.Reset()
|
||||
recordPool.Put(r)
|
||||
}
|
||||
Reference in New Issue
Block a user