In particular, since Go has a goal of avoiding use-after-free bugs, the GC would have to do the same validation it is doing anyway to double-check that the caller is not wrong.
On Saturday, September 14, 2024 at 10:55:49 AM UTC-6 Frederik Zipp wrote: > Yes, by no longer holding a reference to it. If an object is no longer > referenced, it becomes a candidate for garbage collection. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/20d2db53-fa13-44e3-9e8f-a545078e85b8n%40googlegroups.com.