Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor buffer storage 4 #179

Draft
wants to merge 1 commit into
base: 12-17-refactor_buffer_storage_split_split
Choose a base branch
from

Conversation

bmschmidt
Copy link
Collaborator

No description provided.

Copy link
Collaborator Author

bmschmidt commented Dec 18, 2024

private regl: Regl;
public renderer: ReglRenderer;
private bufferMap: WeakMap<ArrayBufferView, DS.BufferLocation> = new Map();
private bufferMap: WeakMap<ArrayBufferView, DS.BufferLocation<Buffer>> = new Map();
Copy link

Choose a reason for hiding this comment

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

The code initializes a WeakMap but incorrectly uses the Map constructor. To fix the type mismatch, replace new Map() with new WeakMap(). This will ensure the implementation matches the declared type and maintains the intended weak reference behavior.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

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.

1 participant