0

I have one canvas where I am showing 5 images in sequence (in sliding). Actually I am getting only 5 images for download that time mobile device not showing out of memory error but when I am going to download 20 images for sliding that time it is showing error out of memory. I want to implement one thing here: whenever I am moving images on canvas that time I want to download only that five images which is showing on canvas not others. But how to do this task on run time of canvas I don't know.

I am looking for some idea how to do this task?

gnat
  • 6,213
  • 108
  • 53
  • 73
Mr. Sajid Shaikh
  • 7,051
  • 4
  • 21
  • 35

1 Answers1

0

For j2me,the heap size is upto 1 to 2 MB.So u download a each image after downloading store in a file.Do not store in application memory.When u want the images read it from file.20 images means large amount of memory is needed (some times it exceeds the heap memory size).So better u store it in a seperate file and not store in application memory.When u want then read it from "FileConnection" API.

SIVAKUMAR.J
  • 4,258
  • 9
  • 45
  • 80