Why would you ever use toCValues instead of refTo ...
# kotlin-native
e
Why would you ever use toCValues instead of refTo since toCValues is so slow?
o
they are different,
toCValues
creates layout expected by C, while
refTo
gets pointer on existing memory with layout expected by C
e
Yes, but my questions is why does IntArray have toCValues function to create the layout. Why would you not always use the refTo when passing an IntArray into a C function