fileItem.js: nullify _loadThumbnailDataCancellable
_loadThumbnailDataCancellable is used while loading the data from a
picture's thumbnail. This patch sets it to null when we are done
with it. This allows to free the memory used and avoids calling its
'cancel' method without reason when the fileItem is destroyed.
Sergio Costas authored 5 years ago
Carlos Soriano committed 4 years ago
310 | 310 | thumbnailFile.load_bytes_async(this._loadThumbnailDataCancellable, |
311 | 311 | (source, result) => { |
312 | 312 | try { |
313 | this._loadThumbnailDataCancellable = null; | |
313 | 314 | let [thumbnailData, etag_out] = source.load_bytes_finish(result); |
314 | 315 | let thumbnailStream = Gio.MemoryInputStream.new_from_bytes(thumbnailData); |
315 | 316 | let thumbnailPixbuf = GdkPixbuf.Pixbuf.new_from_stream(thumbnailStream, null); |