On Friday, 17 September 2021 at 14:29:23 UTC, Steven Schveighoffer wrote:

Looking at that signature, it does not appear that it uses zero-termination at all, as it takes a length. So using `dup` and therefore the gc is totally unnecessary.

I'm assuming that string is the barcode argument?

No, the string appears inside the C-function. I'm calling the function with .ptr and the .length property as it expects.


The `-vgc` switch appears to only identify allocations that the compiler invokes via hooks, not ones that other functions invoke (or ones that are direct calls into the GC).
...

The docs for `-vgc` should really be updated to clarify. It currently just says "List all gc allocations including hidden ones".

-Steve

Thanks for clarification!

Reply via email to