dart-lang / native

Dart packages related to FFI and native assets bundling.
BSD 3-Clause "New" or "Revised" License
149 stars 42 forks source link

[dartdoc] The Dartdoc does not show `MallocAllocator` and `CallocAllocator` #931

Open dcharkes opened 11 months ago

dcharkes commented 11 months ago

The Dartdoc does not show MallocAllocator and CallocAllocator.

https://pub.dev/documentation/ffi/latest/ffi/calloc-constant.html

This is because we're not exporting these classes.

https://github.com/dart-lang/ffi/blob/c926657618443ff4821411ede01684096b503f84/lib/ffi.dart#L5C50-L5C50

Thanks @tvolkert for reporting!

dcharkes commented 2 months ago

I believe we don't want to expose those classes. Instead the field should should be exposed on Allocator:

Unless, we want to communicate that the nativeFree is non-nullable for these two allocators.