[Development] unique_ptr and Qt, Take 2

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Fri Jun 14 06:31:32 CEST 2019


Am 13.06.2019 um 23:44 schrieb Konstantin Tokarev:
>
> 14.06.2019, 00:14, "Christian Ehrlicher" <ch.ehrlicher at gmx.de>:
>> Am 13.06.2019 um 22:09 schrieb Ville Voutilainen:
>>>>   That's one of the things I love about Qt; object hierarchies give me
>>>>   working dynamic memory management without needing even smart pointers.
>>>   That's the one thing that makes me queasy about using Qt in large
>>>   applications; I always need
>>>   to worry about ownership relationships, because I can't program with
>>>   smart pointers. I had the pleasure
>>>   of writing smart-pointer-only code 20 years ago; it was quite
>>>   pleasant, especially considering that
>>>   the largeish application was leaking like a sieve and doing
>>>   use-after-free in all too many places.
>>>   Once we plugged boost's smart pointers into it, all those problems
>>>   went away over a weekend,
>>>   and we never looked back.
>> A very good example on how to kill a library by simply using smart
>> pointer everywhere is QtXmlPatterns:
>>
>> https://bugreports.qt.io/issues/?jql=project%20%3D%20QTBUG%20AND%20status%20%3D%20Reported%20AND%20component%20%3D%20%22XML%3A%20QtXmlPatterns%22%20ORDER%20BY%20key%20DESC
> Any proffs that any of these issues were caused by smart pointers?
Otherwise I would not have mentioned it. Just take a look at the code
and one of the bug report issues... it awesome and you will see why
nobody want/can maintain this library.

Christian



More information about the Development mailing list