chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] malloc'd memory


From: Alexej Magura
Subject: [Chicken-users] malloc'd memory
Date: Sun, 25 Jan 2015 15:21:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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 is done with the pointer?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]