We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 777e7e5 commit 07871c0Copy full SHA for 07871c0
rows.go
@@ -188,6 +188,17 @@ func (rows *baseRows) Close() {
188
} else if rows.queryTracer != nil {
189
rows.queryTracer.TraceQueryEnd(rows.ctx, rows.conn, TraceQueryEndData{rows.commandTag, rows.err})
190
}
191
+
192
+ // Zero references to other memory allocations. This allows them to be GC'd even when the Rows still referenced. In
193
+ // particular, when using pgxpool GC could be delayed as pgxpool.poolRows are allocated in large slices.
194
+ //
195
+ // https://github.com/jackc/pgx/pull/2269
196
+ rows.values = nil
197
+ rows.scanPlans = nil
198
+ rows.scanTypes = nil
199
+ rows.ctx = nil
200
+ rows.sql = ""
201
+ rows.args = nil
202
203
204
func (rows *baseRows) CommandTag() pgconn.CommandTag {
0 commit comments