-
Notifications
You must be signed in to change notification settings - Fork 68
JArray.getRange() has thread-safety problem #1151
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
Comments
What is Please post a minimal reproducible failing code without external dependencies. |
This seems to be a problem with the native finalizer @dcharkes. When I try using a custom allocator (that is not recognized by class CustomAlloc implements Allocator {
@override
Pointer<T> allocate<T extends NativeType>(int byteCount, {int? alignment}) {
return malloc.allocate(byteCount, alignment: alignment);
}
@override
void free(Pointer<NativeType> pointer) {
return malloc.free(pointer);
}
} And later on: final list = iconByteArray
.getRange(0, iconByteArray.length, allocator: CustomAlloc())
.buffer
.asUint8List(); In general you would want to manage the memory yourself, since keeping all of the lists inside the |
As mentioned, this is happening due to dart-lang/sdk#55800. Moving this to backlog. |
multiple executions test(), the return value maybe incorrect.
The text was updated successfully, but these errors were encountered: