Android Question SetApplicationAttribute(android:largeHeap, "true")

wonder

Expert
Licensed User
Longtime User
I was reading @Informatix How To Make Games tutorial and I came across this line:

If you still have problems with memory, you can add this line in the manifest to get more memory with Android versions >= 3:
B4X:
SetApplicationAttribute(android:largeHeap, "true")

Is there any disadvantage to always use this line in every single app we create??
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
If your app doesn't need it then there is no reason to ask the OS for more memory. A process that takes more memory will be killed quicker when it is in the background.

Another possible drawback of this attribute is that it can hide the real issue which is a memory leak.
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
I was reading @Informatix How To Make Games tutorial and I came across this line:



Is there any disadvantage to always use this line in every single app we create??
In a game written with libGDX, this setting is of no use as textures and a few other things are not in the Java heap space.
 
Upvote 0

deantangNYP

Active Member
Licensed User
Longtime User
SetApplicationAttribute(android:largeHeap, "true")

Can i just confirm, this line is to be added into "AndroidManifest.xml"?
Please advise. Thanks.
 
Upvote 0
Top