Arrays of CTypes Memory Layout

Well, if you have just return pointer(a) then that’s invalid code since a may not be valid anymore. Julia, like C# IIUC, is a managed language and you must make sure the objects’ use is visible to the compiler. Doing this across language barrier is not trivial and the solution will depend on the exact call order.

1 Like