crow icon indicating copy to clipboard operation
crow copied to clipboard

Memory leak

Open Karnah opened this issue 9 years ago • 3 comments

Good day. Today I find memory leak. It's happened in http_server.h in do_accept. See this lines:

                {
                    if (!ec)
                    {
                        is.post([p]
                        {
                            p->start();
                        });
                    }
                    do_accept();
                });

if ec != 0 then we have memory leak. I just add:

else {
delete p;
}

but may be you have some another idea about how fix this?

Karnah avatar Nov 19 '16 13:11 Karnah

Same here. It's definetely leaking.

arthurafarias avatar Feb 27 '19 14:02 arthurafarias

I created an example using this library and OpenCV. I'm passing an image through a POST and filtering this image with a gaussian filter. In the first images it rises from a few megabytes to hundreds of megabytes in memory. You can check the project in https://github.com/arthurafarias/microservice-opencv-filter-gausian.

arthurafarias avatar Feb 27 '19 14:02 arthurafarias

It's probably the same problem as here: https://github.com/ipkn/crow/issues/316

mrozigor avatar Feb 28 '19 07:02 mrozigor