On 08/10/2009 04:16 PM, Abdelrazak Younes wrote:
On 10/08/2009 22:11, Pavel Sanda wrote:
Abdelrazak Younes wrote:
This code works and is not the problem. I don't remember the details but the original image is also stored somewhere else in the graphics cache,
AFAIR.

which doesn't help me to understand what '// Clear the pixmap to save some
memory'
means :)


It means "Here we clear the pixmap 'original_' to save the memory that it
occupies"; I don't know to express it in a better way...

maybe its just too late for me today and missing something obvious... but
why i see huge memory difference for the code
if (is_transformed_)
    {
                 original_.~QImage();
                 original_ = QImage();
    }

and for

if (is_transformed_)
    original_ = QImage();

if the second one is intended to clear that pixmap?

Because the original_ pixmap has a shadow copy somewhere else deep inside our graphics system. So deep that it's basically a nightmare to retrieve it at this point. When you call the destructor this shadow copy is of course erased at the same time. This explain why you get a crash at exit.

Can you explain what you mean by "shadow copy" here? Do you mean there is some other variable that points to it, or contains a reference to it, or something of the sort?

rh

Reply via email to