[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] problem with memory leaks
From: |
Ondřej Odcházel |
Subject: |
[libmicrohttpd] problem with memory leaks |
Date: |
Tue, 15 Mar 2011 09:45:49 +0100 |
Hi,
I am confused with the way, how to create dynamic string at function
"answer_to_connection" without memory leaks. I generate some "string
page" and want to pass it like
string page = getSomeRandomString();
struct MHD_Response *response;
int ret;
response = MHD_create_response_from_data (strlen(page.c_str()),
strdup(page.c_str()), MHD_YES, MHD_YES);
ret = MHD_queue_response (connection, status_code, response);
MHD_destroy_response (response);
return ret;
but i have problems with memory leaks. Do you know, where the problem can be?
Thanks,
Ondra
- [libmicrohttpd] problem with memory leaks,
Ondřej Odcházel <=