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/dddb653a-79ec-42a0-8e66-0193e7f4f09fn%40googlegroups.com.