[Development] Don't use Private *d when your class is immutable
Tor Arne Vestbø
tor.arne.vestbo at qt.io
Fri Mar 3 12:10:11 CET 2017
On 03/03/2017 10:59, Lars Knoll wrote:
> I agree, that we should not use any implicit sharing in those cases.
> But in many cases, I don’t see a problem using a pointer to the data.
> Of course if shouldn’t detach. Instead, it should be explicitly
> shared (with or without refcounting depending on whether the data is
> generated at compile or runtime). Using an integer and a global
> lookup table would lead to more complex code in that case.
Thank you Lars. +1
tor arne
More information about the Development
mailing list