Cppgc does stack scanning so objects pointed by raw pointers on stack are 
not garbage collected:

Object* ptr = MakeGarbageCollected<Object>(); // retained.

But what if I put the pointer in a variant?

std::variant<Object*, std::monostate> ptr = MakeGarbageCollected<Object>(); 
// retain?

Or even in a vector?

std::vector<Object*> ptrs = { MakeGarbageCollected<Object>() }; // retain?

Will the object still be retained by the container of pointer on stack?

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/faf54b4c-75b8-4a01-ac17-d369046e3774n%40googlegroups.com.

Reply via email to