libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] MHD_RESPMEM_PERSISTENT


From: Markus Osterhoff
Subject: Re: [libmicrohttpd] MHD_RESPMEM_PERSISTENT
Date: Wed, 25 Jan 2017 15:53:50 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

* Miguel Sancho <address@hidden> [170124 12:17]:
> response = MHD_create_response_from_buffer(size,(void*)buffer, 
> *MHD_RESPMEM_PERSISTENT*);
> ret = MHD_queue_response (connection, 200, response);
> MHD_destroy_response (response);
> free(buffer);
Instead of PERSISTEND and manually free'ing, I would recommend the
option
        MHD_RESPMEM_MUST_FREE
Then MHD will free the memory – when it is safe to do so.

Greetings, Markus




reply via email to

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