RE: allocate & free

new topic     » topic index » view thread      » older message » newer message

> -----Original Message-----
> From: irvm at ellijay.com [mailto:irvm at ellijay.com]
>       poke4(addresses+j*4,allocate_string(data[j])) 
>     
> Problem is, each time this is run, extra memory is used, 
> corresponding to the 
> length of the data loaded. Eventually, I would run out of 
> menory. It does the 
> same whether or not the call to gtk_list_append() is made, so 
> that's not the 
> problem. That leaves free(). Am I not using it correctly?

Looks like you're not tracking the pointer from allocate_string(), so all of
your strings end up staying in memory.

Matt Lewis

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu