Skip to content

Auto-port 5.0: Fill MsgHdrMemoryArray#hdrs with null entry on release#16771

Merged
normanmaurer merged 2 commits into
5.0from
auto-port-pr-16764-to-5.0
May 10, 2026
Merged

Auto-port 5.0: Fill MsgHdrMemoryArray#hdrs with null entry on release#16771
normanmaurer merged 2 commits into
5.0from
auto-port-pr-16764-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #16764 to 5.0
Cherry-picked commit: 27ca159


Motivation:

See #16763

This gives GC a chance to collect entries early.
Calling release on each entry is effectively a no-op.

Modifications:

In MsgHdrMemoryArray#release, fill hdrs array with nulls instead of invoking release on every entry.

Result:

After the instance is release, the GC can collect entries (about 600kb on my machine) early.

Motivation:

See #16763

This gives GC a chance to collect entries early.
Calling release on each entry is effectively a no-op.

Modifications:

In MsgHdrMemoryArray#release, fill hdrs array with nulls instead of
invoking release on every entry.

Result:

After the instance is release, the GC can collect entries (about 600kb
on my machine) early.

---------

Co-authored-by: Norman Maurer <norman_maurer@apple.com>
(cherry picked from commit 27ca159)
@chrisvest chrisvest added this to the 5.0.0.Final milestone May 9, 2026
@chrisvest chrisvest enabled auto-merge (squash) May 9, 2026 21:46
@normanmaurer normanmaurer disabled auto-merge May 10, 2026 06:12
@normanmaurer normanmaurer merged commit 4a99f0f into 5.0 May 10, 2026
12 of 13 checks passed
@normanmaurer normanmaurer deleted the auto-port-pr-16764-to-5.0 branch May 10, 2026 06:13
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.

4 participants