What's the difference between "WEAK" and "STRONG".

29 views
Skip to first unread message

18f

unread,
Apr 22, 2024, 6:17:33 AM4/22/24
to v8-dev
Hi, anybody. I found at here, we have two reference type.
``` c++
WEAK,
};
```

So I want to know:
1. What's the difference between "WEAK" and "STRONG".
2. Which condition we should use WEAK instead of STRONG?

THX.

Jakob Kummerow

unread,
Apr 22, 2024, 6:19:06 AM4/22/24
to v8-...@googlegroups.com
It's a common GC term: strong references keep their target alive, weak references don't. More details at https://en.wikipedia.org/wiki/Weak_reference.

Reply all
Reply to author
Forward
0 new messages