-
Notifications
You must be signed in to change notification settings - Fork 77
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
DartNative's memory management strategy is strongly discouraged by the official Dart team :( #88
Comments
@fzyzcjy I think the Dart VM should provide an interface for setting size of external objects. |
@yulingtianxia You are welcome! |
I guess yes. https://github.com/dart-lang/sdk/blob/main/runtime/include/dart_api.h#L568
and
|
This helps us a lot! Thank you! |
You are welcome! btw
I am curious about it: how will you do it? e.g. Moreover, how to automatically call UpdateExternalSize whenever the size changes? e.g. |
I'm not looking for the perfect solution yet, but it'll work out. |
@yulingtianxia Looking forward to seeing the solution |
|
@yulingtianxia Sounds interesting. I originally want to do similar things in Rust but now seems that it is not possible. Rust seems not to have such "reflection"-like things. |
Hi, I was implementing the fully automatic memory management between Dart/Flutter and Rust (see fzyzcjy/flutter_rust_bridge#243), so I asked some questions to the Dart team, and I find the following reply also applies to your case (http://yulingtianxia.com/blog/2020/08/22/DartNative-Automatic-Memory-Management/):
Link: dart-lang/language#1847 (comment)
The text was updated successfully, but these errors were encountered: