You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Value gets a lifetime 'e so that it cannot outlive the engine
Gc<T> is only permitted for types that implement unsafe trait GcSafe {}, which asserts that you've thoroughly inspected the type for lack of GC references.
In the future this may become an auto trait, but user-defined auto traits and negative trait impls are not stable yet.
The text was updated successfully, but these errors were encountered:
Currently the GC is not fully memory safe. In specific, the
Gc<T>
type may outlive the GC, and the GC will sweep anyGcRaw<T>
references that may be stored in it onDrop
. Additionally the GC doesn't considerGc<T>
references as roots, which is also quite problematic.Thus, a few things need to be done:
Value
gets a lifetime'e
so 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.auto
trait, but user-definedauto
traits and negative trait impls are not stable yet.The text was updated successfully, but these errors were encountered: