simple-mail
simple-mail copied to clipboard
mistake in demo1
In demo1 should be used pointer for MimeText *text = new MimeText() ; because otherwise the app abortes on close, because it try to delete pointers in ~MimeMultiPartPrivate() function that were deleted previosly in app.
This shouldn't crash, because text is in scope, I need to take a deeper look as maybe it should have some QSharedDataPointer
FYI, just had occasion to download and run a clean copy and it trips up for me as well, the destruction process is calling qDeleteAll(c.begin(), c.end()); on all the mime parts, in this case the MimeText which is alive and well on the callers stack. Works fine if the MimeText is created on the heap. [Using a Pro file on Qt 5.9.1, and MSVC2015, yes I know it's time for Qt6]
v3 now uses std::shared_ptr