libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Is there something like MHD_free() ?


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Is there something like MHD_free() ?
Date: Mon, 9 Oct 2017 17:46:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

Hi Tim,

We definitively don't have MHD_free() today.

I'm not aware of any API call where MHD returns a pointer to the
application that the application is expected to free.

There is one case in reverse, where for a response the application can
give a pointer to MHD which MHD will then free(), namely
MHD_RESPMEM_MUST_FREE.  Thus, using this may be unsafe on W32 as here
the application allocates and MHD frees.  However, this is purely
intended as an optimization to avoid a copy.

Happy hacking!

Christian

On 10/09/2017 04:38 PM, Tim Rühsen wrote:
> Hi,
> 
> a library included free() function is basically needed on systems where
> the library malloc heap is different from the caller's malloc heap,
> which happens on Windows when the library is a separate DLL.
> 
> 
> So, is there (or could we have) something like
> 
> void MHD_free(void *ptr)
> {
>         free(ptr);
> }
> 
> ?
> 
> 
> With Best Regards, Tim
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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