Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Memory Leak in ExportBgen #9006

Merged
merged 1 commit into from Jun 23, 2020

Conversation

johnc1231
Copy link
Contributor

CHANGELOG: Fix memory leak in ExportBgen

If you look a dozen or so lines under the boundary I added, you'll see a :

        it.foreach { ptr =>
          val (b, d) = bpw.emitVariant(ptr)
          out.write(b)
          dropped += d
        }

So that thing is stepping through the iterator without freeing. The boundary is to do a clear after each read from the it.

@johnc1231
Copy link
Contributor Author

Copy link
Collaborator

@patrick-schultz patrick-schultz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@danking danking merged commit bf7b7f7 into hail-is:master Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants