-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Currently the GC is not fully memory safe. In specific, the Gc<T> type may outlive the GC, and the GC will sweep any GcRaw<T> references that may be stored in it on Drop. Additionally the GC doesn't consider Gc<T> references as roots, which is also quite problematic.
Thus, a few things need to be done:
Valuegets a lifetime'eso that it cannot outlive the engineGc<T>is only permitted for types that implementunsafe trait GcSafe {}, which asserts that you've thoroughly inspected the type for lack of GC references.- In the future this may become an
autotrait, but user-definedautotraits and negative trait impls are not stable yet.
- In the future this may become an
Reactions are currently unavailable