1
0
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:
源文雨
2025-02-25 13:59:39 +09:00
parent 6a0442eaa7
commit 8c5e0cfad0
2 changed files with 21 additions and 14 deletions

View File

@@ -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()