Greetings.
I’ve been reading about the feature ‘Implicit Sharing’ Qt classes and I doubt has arisen as follows:
Is this feature works just when working with pointers and not directly with objects?
example:
/* img1 and img2 being kind QImage objects: QImage img1, img2; */
img1 = img2; // Here img1 and img2 share the data
But in the case:
/* img1 and img2 as QImage pointers: QImage *img1, *img2; */
*img1 = *img2; // img1 and img2 share the data or not?
So are both equivalent or am I wrong?
Thanks in advance for any responses and/or comments.
↧