How does Dart VM Garbage Collection Work?

398 views
Skip to first unread message

Haha Guy

unread,
Nov 13, 2018, 2:27:17 AM11/13/18
to Dart VM Developers
Before diving into the implementation details, Im wondering how GC works with Dart_Handle to ensure safe memory management.

Siva Annamalai

unread,
Nov 13, 2018, 11:15:43 AM11/13/18
to vm-...@dartlang.org
Dart_Handles point to regular Dart objects and during GC all these handles become part of the root set used
to determine if an object is still in use.
There are two kinds of handles the Scoped local handles which are live only within a scope created using
Dart_EnterScope and exited with Dart_ExitScope. The other kind of handles are the persistent handles
created using Dart_NewPersistentHandle and these handles are live across scopes until they are deleted
using Dart_DeletePersistentHandle


On Mon, Nov 12, 2018 at 11:27 PM Haha Guy <flybroth...@gmail.com> wrote:
Before diving into the implementation details, Im wondering how GC works with Dart_Handle to ensure safe memory management.

--
You received this message because you are subscribed to the Google Groups "Dart VM Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vm-dev+un...@dartlang.org.

Haha Guy

unread,
Nov 14, 2018, 3:35:09 AM11/14/18
to Dart VM Developers
Thanks for the reply bro. You mentioned that "all these handles become part of the root set ", how is the rest of the root set decided for each isolate?

在 2018年11月13日星期二 UTC+8下午3:27:17,Haha Guy写道:
Reply all
Reply to author
Forward
0 new messages