Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Since you do not provide details about what processing1, processing2 and processing3 do. Just to be safe you can use a clone().

For performance reasons you don't want to use clone because it copies all data instead of passing a reference to the data.

On a functional level it depends on what processing3 does, does it change the data one of it's inputs? Then in the case of the assignment img2 and m_img point to the same data. And are both changed. And I don't know if that is what you want...

Read this for more background info.