simple-mail icon indicating copy to clipboard operation
simple-mail copied to clipboard

mistake in demo1

Open KellyDink opened this issue 5 years ago • 2 comments

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.

KellyDink avatar Jul 08 '20 08:07 KellyDink

This shouldn't crash, because text is in scope, I need to take a deeper look as maybe it should have some QSharedDataPointer

dantti avatar Sep 03 '20 17:09 dantti

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]

DavidKelleySCSC avatar Dec 24 '20 16:12 DavidKelleySCSC

v3 now uses std::shared_ptr

dantti avatar Oct 26 '23 20:10 dantti