We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32a922e commit 9d9743dCopy full SHA for 9d9743d
objectbox/lib/src/native/bindings/flatbuffers.dart
@@ -108,12 +108,8 @@ class Allocator extends fb.Allocator {
108
.lookupFunction<_c_memset, _dart_memset>('memset');
109
} catch (_) {
110
// fall back if we can't load a native memset()
111
- fbMemset = (Pointer<Uint8> ptr, int byte, int size) {
112
- final bytes = ptr.cast<Uint8>();
113
- for (var i = 0; i < size; i++) {
114
- bytes[i] = byte;
115
- }
116
- };
+ fbMemset = (Pointer<Uint8> ptr, int byte, int size) =>
+ ptr.cast<Uint8>().asTypedList(size).fillRange(0, size, 0);
117
}
118
} else {
119
fbMemset = DynamicLibrary.process()
0 commit comments