Wrap the ptr UncheckedArray, len pair in an object and write custom =destroy 
and = procs. (= would be `proc `=`(self: var Foo; other: Foo) {.error.}` since 
you want to avoid copies. The destructor frees the memory using whatever 
function is provided by the C library.

Reply via email to