Thanks both for the help. I feel a bit silly now, as I did read the
ffi memory management page... ahh well. Excuses, excuses, eh?
Thankfully, in this case, the pointer isn't kept by the c library, as
it is just wanting somewhere to store a string.
Thanks again,
Neil
On 26 January 2012 14:12, Mi
Hey there, Neil!
When racket allocates something, it lives in memory that's
managed by the garbage collector unless you say otherwise. By
contrast, when the C library allocates something, racket's
garbage collector has no clue about it -- that's what (free) is
for.
By default, (malloc) allocates
At Thu, 26 Jan 2012 11:10:16 +1100, Neil Caldwell wrote:
> #lang racket
>
> (require ffi/unsafe)
>
> (free (malloc _pointer))
By default, `malloc' allocates memory that is managed by the Racket
garbage collector instead of the C library.
Specify 'raw mode to use the C library's malloc():
#lan
Hi
I've just started playing with racket, and decided to start with a
small (that's what I'm telling myself, anyway) project in the form of
an xmms2 client. To do this, I'm having to interface with
libxmmsclient. Long story short, I'm having a problem with free, and
was hoping to get some advice.
On 01/24/2012 05:24 PM, Ryan Culpepper wrote:
Thanks for the report. The problem was indeed due to my using
dynamic-place; I've added a use of define-runtime-module-path-index so
the compiler knows about the dependency.
Thanks Ryan. Will this be in the 5.2.1 release? I'm sure other people
will
5 matches
Mail list logo