Re: mem leaks win32 call_back

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

one of the projects i have is a wrapper for
the CURL libraries where i have been converting
some of my older 'C' code that creates/downloads/destroys connections
for url/ftp downloads as and when needed.

as part of the connection process i create callbacks
to buffer data.

porting the 'C' code to the euphoria equivalent yields
the following

... 
self[headfunc]  = routine_id("strip_cookies") 
self[writefunc] = routine_id("strip_data") 
self[headfunc]  = call_back({ '+', self[headfunc] }) 
self[writefunc] = call_back({ '+', self[writefunc] }) 
curl:setopt(self[handle], CURLOPT_HEADERFUNCTION, self[headfunc]) 
curl:setopt(self[handle], CURLOPT_WRITEFUNCTION,  self[writefunc]) 
etc ... 


which, if created/used/destroyed 'on the fly', will run into the mem leak
issues as outlined at the top of this thread

i was hoping to maintain 'like for like' code and flow control
between the two language versions as an aid for testing/debugging

anyways, not a show stopper.

for now, i'll just have to redesign some aspects of the code

would be ideal to have the have as much user control as possible
over allocated memory at some stage though.

thanks for the updates

btw, me is a he

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

Search



Quick Links

User menu

Not signed in.

Misc Menu