Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.
This repository was archived by the owner on May 24, 2023. It is now read-only.

Dangers of defer() in a loop #26

@xaprb

Description

@xaprb

In case it's not clear, we should warn people against a long-lived function using defer() to close results. The deferred code keeps a reference to the *sql.Rows, and that eats up memory steadily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions