Skip to content

fix some quick wins#1603

Merged
lukebakken merged 1 commit intorabbitmq:mainfrom
bollhals:fix/allocation
Jun 20, 2024
Merged

fix some quick wins#1603
lukebakken merged 1 commit intorabbitmq:mainfrom
bollhals:fix/allocation

Conversation

@bollhals
Copy link
Contributor

Proposed Changes

Fixes 2 easy cases of allocations.

  1. GC.SuppressFinalize(this); for a struct is useless and boxes the struct allocating the box.
  2. BasicPublishMemory is only useful if you already have a memory, encoding it on the fly is worse than using BasicPublish instead.

Types of Changes

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Performance change

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

@michaelklishin
Copy link
Contributor

@bollhals thank you!

@lukebakken lukebakken self-assigned this Jun 20, 2024
@lukebakken lukebakken self-requested a review June 20, 2024 15:42
@lukebakken lukebakken added this to the 7.0.0 milestone Jun 20, 2024
@lukebakken lukebakken merged commit 26bb8f7 into rabbitmq:main Jun 20, 2024
@bollhals bollhals deleted the fix/allocation branch June 21, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants