go des

package main
import (
"fmt"
"runtime"
)

type A struct {
a int
}

func main() {
self := new(A)
self.a = 99

runtime.SetFinalizer(self, func(self *A) {
self.a = 0
fmt.Println("des")
})
}
posted @ 2021-11-04 17:29  zJanly  阅读(105)  评论(0编辑  收藏  举报