SilkMarshal.JaggedArrayToPointerArray). if InteriorRef is actually a ref ConstPtr<int>, the referencee will continue to be tracked and ergo the encapsulated reference will continue to be trackedPtrType/ConstPtrType either given you can't put them on the heap eitherPtrType<Ptr<int>> the inner Ptr may reference a field on the heap, which presumably will be untracked when we go from PtrType<int> to Ptr<int> (or whatever we reinterpret it to)Ptr<T>.RefType this[nuint idx]MutRefMutGet cause that'd get uglyGet<T>(this Ptr<T> x) where T does not allow ref structs as a genericPtrType/Ptr and also ConstPtrType/ConstPtrPtrType<schar> marshalMyString = new string("chonkballs".ToCharArray()); // make a new string bc the string literal is in the constant pool
PtrType<Ptr<schar>> ptrToThatVariable = marshalMyString.PtrTo();
for (var i = 0; i < 5; i++)
ptrToThatVariable.Get(0, i);GetGet<T>(this Ptr<T> x)ConstPtrpublic static class PtrAccessor
{
public static PtrType<T2> Get<T2, T>(this PtrType<T> self, int i)
where T: IPtrMarker<T2>
{
// IDK take an index and do magic with the inner of PtrType
throw null;
}
public static PtrType<T3> Get<T3, T2, T>(this PtrType<T> self, int i, int j)
where T: IPtrMarker<T2>
where T2: IPtrMarker<T3>
{
return self.Get(i).Get(j);
}
}