Hello everything, I try to generate thumbnails from images and as a result I receive leakage of memory. From the main window I open the second window with a photo of galleries. When opening a new window there is a generation of thumbnails:
var itemFullPath = storageDirectoryNativePath + Titanium.Filesystem.separator + directoryItems[i].toString();
var currentItem = Ti.Filesystem.getFile(itemFullPath);
var blob = currentItem.read();
var thumbnailImage = blob.imageAsThumbnail(100);
in the console begins is shown:
[WARN][TiImageHelper( 7583)] (KrollRuntimeThread) [527,202741] Unable to add rounded corners. Invalid corner radius or borderSize for imageWithRoundedCorner
[INFO][dalvikvm-heap( 7583)] Grow heap (frag case) to 39.775MB for 19660816-byte allocation
[WARN][TiImageHelper( 7583)] (KrollRuntimeThread) [521,203262] Unable to add rounded corners. Invalid corner radius or borderSize for imageWithRoundedCorner
[INFO][dalvikvm-heap( 7583)] Grow heap (frag case) to 39.833MB for 19660816-byte allocation
[INFO][SurfaceFlinger( 100)] [SurfaceFlinger] frames:10, duration:1.050000, fps:9.515434
[WARN][TiImageHelper( 7583)] (KrollRuntimeThread) [535,203797] Unable to add rounded corners. Invalid corner radius or borderSize for imageWithRoundedCorner
[INFO][dalvikvm-heap( 7583)] Grow heap (frag case) to 39.889MB for 19660816-byte allocation
[WARN][TiImageHelper( 7583)] (KrollRuntimeThread) [474,204271] Unable to add rounded corners. Invalid corner radius or borderSize for imageWithRoundedCorner
[INFO][dalvikvm-heap( 7583)] Grow heap (frag case) to 39.947MB for 19660816-byte allocation
[INFO][SurfaceFlinger( 100)] [SurfaceFlinger] frames:10, duration:1.039000, fps:9.615705
then I close gallery, I nullify images and I come back to the main window. And when again you open gallery and memory continues to grow:
[INFO][dalvikvm-heap( 7583)] Grow heap (frag case) to 40.004MB for 19660816-byte allocation
[WARN][TiImageHelper( 7583)] (KrollRuntimeThread) [622,205404] Unable to add rounded corners. Invalid corner radius or borderSize for imageWithRoundedCorner
[INFO][dalvikvm-heap( 7583)] Grow heap (frag case) to 40.055MB for 19660816-byte allocation
eventually there is in the console a message:
[ERROR][dalvikvm-heap( 7583)] Out of memory on a 19660816-byte allocation.
and crash.
if to clean var thumbnailImage = blob.imageAsThumbnail(100);
leaks don't happen and in the console is shown nothing from above listed.
SDK 3.1.1, physical device Google nexus - Android 4.1 (at the android of 2.3 everything works perfectly) Titanium Studio, build: 3.1.1.201306112235 (c) Copyright 2012-2013 by Appcelerator, Inc. All rights reserved. Build: jenkins-titanium-rcp-master-466 (origin/master) Date: 11 June 2013, 22:38:40