mirror of
https://github.com/fumiama/orbyte.git
synced 2026-06-10 21:24:50 +08:00
fix(item): trans destroy procedure
This commit is contained in:
8
pool.go
8
pool.go
@@ -63,14 +63,12 @@ func (pool *Pool[T]) newempty() *Item[T] {
|
||||
func (pool *Pool[T]) put(item *Item[T]) {
|
||||
runtime.SetFinalizer(item, nil)
|
||||
|
||||
item.stat.setdestroyed(true)
|
||||
item.cfg = nil
|
||||
|
||||
if pool.isstrict {
|
||||
return
|
||||
}
|
||||
|
||||
item.cfg = nil
|
||||
var dt T
|
||||
item.val = dt
|
||||
|
||||
pool.pool.Put(item)
|
||||
|
||||
pool.decout()
|
||||
|
||||
Reference in New Issue
Block a user