https://bugs.kde.org/show_bug.cgi?id=408797

--- Comment #8 from Loïc Yhuel <loic.yh...@gmail.com> ---
(In reply to Loïc Yhuel from comment #4)
> Until Qt 5.12 (https://codereview.qt-project.org/c/qt/qtbase/+/230316), you
> are not allowed to delete a QTextCodec.
> 
https://bugs.kde.org/show_bug.cgi?id=412103 made me realize that even with Qt
5.12, allocating a QTextCodec on the stack is not valid, unless there is no
exit() anywhere below, since if it isn't destroyed before QCoreGlobalData, the
delete operator will be called, which will call free on a stack address.

So, even with Qt 5.12, the proper solution is to allocate it on the heap :
"(void)new LegacyCodec;".

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to