Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.0
-
None
-
33b664eabe5d9621d71e5bf3bfcc46ea385a399c
Description
The Image::pixmap property should be removed since it inherently causes memory issues. If a pixmap is created in a Qt application, passed to QML/JavaScript, and then not released by the Qt application, the memory used by the pixmap is never properly released. This is because the JS side does not know the size of the pixmap, and in any case, should not release it due to the pixmap sharing features in Qt.
Instead of using Image::pixmap, applications should create a QDeclarativeImageProvider that provides the requested images to the QML code. Note that pixmaps can only be created in the main thread, so QDeclarativeImageProvider would need to always provide pixmaps synchronously.
Attachments
Issue Links
- depends on
-
QTBUG-11989 Support synchronous image loading and QPixmaps in QDeclarativeImageProvider
- Closed