Android Question Downsampling image due to lack of memory with video and sample app

Douglas Farias

Expert
Licensed User
Hi all.
Later i see many posts, see many discutions about, see 100 + questions about
i made a video with my problem or i think, problem of many users, and i want to understand this on b4a.

i made a sample app with only 2 activity
1° have 1 imageview and 1 button
2° have 3 imageview and 1 button

when you open the sample press a button startactivity2
on the activity2 you press the button and this finish the activity

i make this 8x, 8 times open and close open and close and here is the Downsampling image due to lack of memory.

can someone post here one sample without this error same sample with fix?

i make a video here



here is the sample
www.likeapps.net/appmostrar.rar

i realy dont understand.

1° memory error its not normal, have 1000000000000+ apps based on images made in eclipse without this error, apps with 1mb images + and 100 + images.

2° here is a sample only with 3 imageviews, now how can make one big app in b4a with 5 6 activitys?
40 50 60 panels, 60 image views etc its imposible? *-*

3° I cant use low images how time with 10 20kb, why on eclipse when i use 1mb image to layouts i dont have memory error?

4° this problem dont is only in debug in release have the same problem

this is my all questions, i really want to learn about and know how to fix this error =(

thx to all and sory to question this again
 
Last edited:

Erel

Administrator
Staff member
Licensed User
The YouTube video doesn't work.

I tested your app in Release mode and the memory was released correctly. I didn't see any memory leak.
I did see a memory leak in rapid debug mode. It will be checked.

Loading large images requires a lot of memory. The file size is not important. Only the image size (width / height). Note that it has nothing to do with B4A or Eclipse. The same APIs are used to load the images.

You should resize the large images. The quality will be good even if the images are smaller.
 
Last edited:

Douglas Farias

Expert
Licensed User
realy in released mode dont bug.

ok and use images 1200x1200 with max 80kb its a problem?

and about anothers images on activity create firsttime is the same of layout?

for example menu, i add menu imagens on create firsttime i dont go have problem when close this activity and run again later?
 

MaFu

Well-Known Member
Licensed User
realy in released mode dont bug.

ok and use images 1200x1200 with max 80kb its a problem?

and about anothers images on activity create firsttime is the same of layout?

for example menu, i add menu imagens on create firsttime i dont go have problem when close this activity and run again later?
A 1200x1200 image doesn't have 80KB, it have 5,7MB.
 
Top