Skip to content

Conversation

@Kyle-Ye
Copy link
Collaborator

@Kyle-Ye Kyle-Ye commented Oct 6, 2025

Summary

Fixes memory management in _DynamicPropertyBuffer when transferring items between old and new buffers.

Changes

  • Changed oldItemPointer.pointee to oldItemPointer.move() in the buffer reallocation logic
  • This properly transfers ownership of the item instead of just copying the value

Why

Using move() ensures proper memory ownership transfer when moving items between buffers, which is safer and more correct for memory management in this context.

Test plan

  • Existing tests should continue to pass
  • No behavioral changes expected, only improved memory safety

Use move() instead of pointee when transferring items between buffers to properly transfer ownership and avoid potential memory issues. (Current they are the same since Item is a fixed POD type)
@github-actions github-actions bot added bug Something isn't working P1 Medium priority labels Oct 6, 2025
@codecov
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.63%. Comparing base (ebb0ebf) to head (f6d83f4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #551      +/-   ##
==========================================
- Coverage   24.66%   24.63%   -0.04%     
==========================================
  Files         505      505              
  Lines       29204    29204              
==========================================
- Hits         7202     7193       -9     
- Misses      22002    22011       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye Kyle-Ye merged commit 39691cb into main Oct 6, 2025
9 checks passed
@Kyle-Ye Kyle-Ye deleted the replace-copy-with-move-dynamicpropertybuffer branch October 6, 2025 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working P1 Medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants