Android Question How not to waste memory?

FJS

Active Member
Licensed User
Longtime User
Good afternoon,

I have two questions:

1- I have tried to use "recycle", like this

Dim Obj1 As Reflector
Obj1.Target=puntuacionini
Obj1.RunMethod("recycle")
where puntuacionini is a bitmapdata, but it doesnot work, Do you know why?

2- Please could you give us any "gold rules" to create apps and games and save memory??, is there any information in the forum??

For example, when we waste memory, when "Dim bitmap1 as bitmapdata" or when i load the file??

Thank you very much for the help like always
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. You can make them smaller than the target size.
2. The memory problems you encounter are related to the bitmaps. Other objects footprint is much smaller.
 
Upvote 0

FJS

Active Member
Licensed User
Longtime User
With the following sentence (at manifest editor):
B4X:
SetApplicationAttribute(android:largeHeap,"true")

The app works great, in the table (10").
Now I am going to work on the code to truy to do it more efficiente.


Thank you very much for all your help, to all the forum people, and especially to informatix and Erel!!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…