qhttpengine icon indicating copy to clipboard operation
qhttpengine copied to clipboard

potential memory leak

Open benadler opened this issue 4 years ago • 0 comments

My client code calls QHttpEngine::QObjectHandler::registerMethod(...):

Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7f184c417ca1 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99 #1 0x55a2db94726b in registerMethod_functor<HttpServer::HttpServer(...arguments...)::<lambda(QHttpEngine::Socket*)>, void (HttpServer::HttpServer(...arguments...)::<lambda(QHttpEngine::Socket*)>::)(QHttpEngine::Socket) const> /src/include/qhttpengine/qobjecthandler.h:184 #2 0x55a2db94726b in registerMethod<HttpServer::HttpServer(...arguments...)::<lambda(QHttpEngine::Socket*)> > /src/include/qhttpengine/qobjecthandler.h:157 #3 0x55a2db94726b in registerMethod<HttpServer::HttpServer(...arguments...)::<lambda(QHttpEngine::Socket*)> > /src/include/qhttpengine/qobjecthandler.h:142 #4 0x55a2db94726b in main.cpp:250

I deleted my QObjectHandler during shutdown.

I think this is the new QtPrivate::QFunctorSlotObject<Func1, 1, typename SlotType::Arguments, void>(slot) in qobjecthandler.h:184. Where is that new deleted?

benadler avatar Jul 15 '21 03:07 benadler