Codebase list gnome-shell-extension-desktop-icons / b6766a8
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
1 changed file(s) with 1 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
310310 thumbnailFile.load_bytes_async(this._loadThumbnailDataCancellable,
311311 (source, result) => {
312312 try {
313 this._loadThumbnailDataCancellable = null;
313314 let [thumbnailData, etag_out] = source.load_bytes_finish(result);
314315 let thumbnailStream = Gio.MemoryInputStream.new_from_bytes(thumbnailData);
315316 let thumbnailPixbuf = GdkPixbuf.Pixbuf.new_from_stream(thumbnailStream, null);