FAQ

On Fri, Nov 13, 2015 at 9:33 PM, Albert Tedja wrote:
net/http's Response does not seem to be automatically garbage collected.
https://golang.org/pkg/net/http/
The client must close the response body when finished with it:
Is there any other in Go's packages where we have to be aware of this?
It's not really accurate to say that it is not garbage collected. It
is garbage collected. It's just that in order to reuse HTTP
connections the net/http package needs to know when you are done with
the previous response.

Any place where you need to be aware of this sort of thing is documented.

Ian

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedNov 14, '15 at 4:26p
activeNov 15, '15 at 11:44a
posts4
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase