File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11import * as data_observable from "tns-core-modules/data/observable" ;
2- import * as frame from "tns-core-modules/ui/frame" ;
32import * as imageAssetModule from "tns-core-modules/image-asset" ;
43import { Options , ImagePickerMediaType } from "." ;
54import { View } from "tns-core-modules/ui/core/view/view" ;
5+ import * as utils from "tns-core-modules/utils/utils" ;
66
77const defaultAssetCollectionSubtypes : NSArray < any > = NSArray . arrayWithArray ( < any > [
88 PHAssetCollectionSubtype . SmartAlbumRecentlyAdded ,
@@ -102,7 +102,13 @@ export class ImagePickerControllerDelegate extends NSObject implements QBImagePi
102102
103103 this . _resolve ( assets ) ;
104104
105- imagePickerController . dismissViewControllerAnimatedCompletion ( true , null ) ;
105+ imagePickerController . dismissViewControllerAnimatedCompletion ( true , ( ) => {
106+ // FIX: possible memory issue when picking images many times.
107+ // Not the best solution, but the only one working for now
108+ // https://github.com/NativeScript/nativescript-imagepicker/issues/222
109+ setTimeout ( utils . GC , 200 ) ;
110+ } ) ;
111+
106112 }
107113
108114 public static ObjCProtocols = [ QBImagePickerControllerDelegate ] ;
You can’t perform that action at this time.
0 commit comments