Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

[NC-1772] Fix memory leak #116

Merged
merged 2 commits into from
Oct 22, 2018
Merged

[NC-1772] Fix memory leak #116

merged 2 commits into from
Oct 22, 2018

Conversation

ajsutton
Copy link
Contributor

PR description

Avoid allocating and returning a ByteBuf from MessageFramer.frame. We can write directly to the target instead and avoid the caller needing to release the buffer.

We had been missing this release which meant that a small amount of memory from the allocation pool was lost each time a peer connected.

Related Issue(s)

https://pegasys1.atlassian.net/browse/NC-1772

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

….frame. We can write directly to the target instead and avoid the caller needing to release the buffer.
Copy link
Contributor

@shemnon shemnon left a comment

Choose a reason for hiding this comment

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

LGTM

@ajsutton ajsutton merged commit 9e74b7b into PegaSysEng:master Oct 22, 2018
@ajsutton ajsutton deleted the NC-1772 branch October 22, 2018 23:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants