Skip to content

runtime/pprof: fix resource leak in documentation #26970

@rillig

Description

@rillig

Does this issue reproduce with the latest release?

yes

What did you do?

I copied the example code from runtime/pprof into my project and used it. It worked well.
Today I wrote a test for that piece of code, and I could not delete the profiling file because it was still busy.
Adding the appropriate f.Close() call fixed the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions