On Tuesday, 5 July 2016 at 13:48:46 UTC, Claude wrote:
Ah ok. I tried using void[size] static array and it seems to work without having to use GC.addRange().

Correct. void[] means the type of the data is unknown, so the GC has to assume it can contain pointers.

This also means that _everything_ in any void buffer has to be treated as a potential pointer. In other words, if you allocate a void buffer and fill it with ints, and one of those ints happens to have a value equal to the address of a GC-allocated object, the GC will assume the int is a pointer to that object and not free it.

Reply via email to