Re: [Chicken-users] malloc'd memory

2015-01-25 Thread Thomas Chust
On 2015-01-25 23:21, Alexej Magura wrote: If I have a function that returns a malloc'd pointer, or that needs to have a buffer malloc'd, is it more idiomatic to (1) malloc and free in the caller function (which is C's idiom, IIRC), or (2) malloc it in C and then just return the pointer for

[Chicken-users] malloc'd memory

2015-01-25 Thread Alexej Magura
If I have a function that returns a malloc'd pointer, or that needs to have a buffer malloc'd, is it more idiomatic to (1) malloc and free in the caller function (which is C's idiom, IIRC), or (2) malloc it in C and then just return the pointer for free'ing by Chicken once the caller function