RE: allocate & free
- Posted by Matthew Lewis <matthewwalkerlewis at YAHOO.COM> Dec 10, 2001
- 419 views
> -----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