Skip to content

Conversation

@mustiikhalil
Copy link
Collaborator

The following PR addresses #8642 where it seems that the memory is kept alive although the user has deallocated it.

This would allow the users to by default to reset the Builders for Flexbuffers and Flatbuffers to their initial starting sizes example:

let fbx = FlexBuffersWriter(initialSize:8)
fbx.reset()
XCTAssertEqual(fbx.writerIndex, 0)
XCTAssertEqual(fbx.capacity, 8)

However when needed developers can use the api fbx.reset(keepingCapacity: true) which will retain all the internal sizes and builds within that already existing memory.

@github-actions github-actions bot added the swift label Jul 18, 2025
@mustiikhalil mustiikhalil force-pushed the adds-option-to-keep-capacity-bytebuffer branch from 6ecc95e to f16d4f4 Compare July 18, 2025 15:58
Allows a complete reset for the underlying memory of the
_InternalByteBuffers within FlatBuffers and FlexBuffers.
@mustiikhalil mustiikhalil force-pushed the adds-option-to-keep-capacity-bytebuffer branch from f16d4f4 to 6922df8 Compare July 18, 2025 15:59
@mustiikhalil mustiikhalil self-assigned this Jul 18, 2025
@mustiikhalil mustiikhalil requested a review from aardappel July 18, 2025 16:03
@mustiikhalil
Copy link
Collaborator Author

@aardappel when possible can you take a look

@mustiikhalil mustiikhalil enabled auto-merge (squash) July 18, 2025 16:03
@mustiikhalil mustiikhalil merged commit ca73ff3 into google:master Jul 18, 2025
50 checks passed
dongjoon-hyun added a commit to apache/spark-connect-swift that referenced this pull request Oct 28, 2025
### What changes were proposed in this pull request?

This PR aims to upgrade `FlatBuffers` to `v25.9.23`

### Why are the changes needed?

To bring the latest bug fixes and improvements like `Windows` support.
- https://github.com/google/flatbuffers/releases/tag/v25.9.23 (2025-09-23)
  - google/flatbuffers#8484
  - google/flatbuffers#8577
  - google/flatbuffers#8622
  - google/flatbuffers#8637
  - google/flatbuffers#8643
  - google/flatbuffers#8650
  - google/flatbuffers#8649
  - google/flatbuffers#8702

### Does this PR introduce _any_ user-facing change?

No. There is no behavior change.

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #254 from dongjoon-hyun/SPARK-54045.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
@mustiikhalil mustiikhalil deleted the adds-option-to-keep-capacity-bytebuffer branch November 14, 2025 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants