commit | a53c12d07af05e87e9a24c9fe9ef880dd65e4e4f | [log] [tgz] |
---|---|---|
author | Matthew Dempsky <mdempsky@google.com> | Mon May 06 21:01:39 2019 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Mon May 06 21:01:39 2019 +0000 |
tree | e73bf57837fdb436a8f8ffa19cbd95d0ca7c3aeb | |
parent | 457e58c6379be1a2038ba1296e543474078faac1 [diff] |
[vm] Use std::unique_ptr with Message Message is a C++ type with a simple ownership model appropriate for std::unique_ptr. This CL applies the following changes: 1. All uses of "new Message(...)" are replaced with "Message::New(...)", which is effectively "std::make_unique<Message>(...)". (The latter was only added in C++14, but Dart still compiles in C++11 mode.) 2. All owning Message* are replaced with std::unique_ptr<Message>. The notable exception is MessageQueue, which still uses raw Message* internally to simplify the linked list handling. 3. All "delete message;" statements are removed. 4. Uses of "NULL" replaced with "nullptr" as necessary. Change-Id: I05b5804289f2a225bfa05d3c1631129358fed373 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101222 Reviewed-by: Vyacheslav Egorov <vegorov@google.com> Commit-Queue: Matthew Dempsky <mdempsky@google.com>
Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Visit the dartlang.org to learn more about the language, tools, getting started, and more.
Browse pub.dartlang.org for more packages and libraries contributed by the community and the Dart team.
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.