-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
DataView doesn't work with Buffer from pool #2888
Comments
The ArrayBuffer changes, but not at the right index. If you want your DataView to start at the same offset as the Buffer object, you need to instantiate it with the |
Thanks. This behaviour is a bit counter-intuitive since I would suspect the underlying ArrayBuffer in Correct usage:
|
I guess that if it was a slice, there would be no point in having a |
With slice I mean subarray because slice and subarray are the same thing for a Buffer. I want to simplify write{Type} or read{Type} by using DataView ;) |
Remember that Buffer is now just a |
I wanted to simplify the various .read{Type} or .write{Type} by using a DataView implementation and
found out that is not possible to use the Buffer's ArrayBuffer if the buffer was sliced from the pool.
results into
The problem is the underlying ArrayBuffer for the new sliced TypedArray does not change.
The text was updated successfully, but these errors were encountered: