On 9/6/2011 5:11 PM, Vladimir Panteleev wrote:
I'd be happy with either this, or "big red warnings" saying that
careless use of this module can lead to hard-to-track memory corruption
bugs :)


The big red warning in the docs is do-able and probably a good idea. However, I really don't want to force any casts or anything like that because such restrictiveness would get in the way instead of helping way too often. As mentioned previously, not all pointers are to GC-allocated memory. Furthermore, having pointers from unscanned memory to GC-allocated memory is safe as long as that's not the **only** pointer you have to the object. This is important, for example, when making a temporary copy of an array of pointers to GC-allocated objects to sort it: The original is still keeping the objects alive.

Reply via email to