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

Fix ByteArray resizing for js target #363

Merged
merged 1 commit into from
Mar 4, 2015
Merged

Fix ByteArray resizing for js target #363

merged 1 commit into from
Mar 4, 2015

Conversation

restorer
Copy link
Contributor

@restorer restorer commented Mar 4, 2015

Originally, I encountered this problem when I was playing with luxeengine - snowkit/snow#68

Since ByteArray in show was based on ByteArray from lime, I checked lime's version, and found the same bug.

I don't know exact lime roadmap (will lime still use it own implementation of ByteArray or will use typedarrays like snow), but maybe this pull-request will be useful.


Prehistory: let's have an empty ByteArray, and then do writeByte in a loop.

value allocated action
- 0 initial
1 1 up resize
2 2 up resize
3 4 up resize
4 4 -
5 8 up resize
6 6 down resize
7 12 up resize
8 8 down resize
9 16 up resize
10 10 down resize
... ... ... etc ...

Originally, I encountered this problem with I was playing with luxeengine - snowkit/snow#68
Since ByteArray in show was based on ByteArray from lime, I checked lime's version, and found the same bug.
I don't know exact lime roadmap (will lime still use it own implementation of ByteArray or will use typedarrays like snow), but maybe this pull-request will be useful.
jgranick added a commit that referenced this pull request Mar 4, 2015
Fix ByteArray resizing for js target
@jgranick jgranick merged commit f88a35f into openfl:master Mar 4, 2015
@restorer restorer deleted the patch-2 branch April 28, 2016 10:53
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.

2 participants