On 08/10/2009 04:21 PM, Abdelrazak Younes wrote:
QPixmap are implicitly shared. So this means that when you do a = b, a
will be a shadow copy of b up until it is modified, thus occupying
zero additional memory. This is the same concept as shared pointer,
the object, and thus the memory, is not cleared up until the last use
of it is destroyed.
OK, so here's an idea. The problem lies more or less in
Loader::Impl::createPixmap(), here:
image_.reset(cached_item_->image()->clone());
bool const success = image_->setPixmap(params_);
The first line clones the original image, if I'm not mistaken, and all
the transformations then happen in the call to GuiImage::setPixmap().
But the cached original remains. So can we clear that once this has
happened?
Richard