0

By Using Static variables any memory issue?

8th Jul 2020, 5:07 PM
Ravi Vardhan AAdhf
Ravi Vardhan AAdhf - avatar
2 Respostas
+ 8
Ravi Vardhan AAdhf static variables has the same method of memory allocation they don't differ in memory allocation as far as I know... It saves memory by not creating separate variable for each recursive call or different function call. Thus there's a high chance that recursion might make your program run out of memory, if there's a lot of memory allocation in the method. Ig I have missed many points.. you can see this one.. https://beginnersbook.com/2013/05/static-variable/
8th Jul 2020, 5:24 PM
Aditya
Aditya - avatar
+ 4
Normally there is no big problem but if your are take step into android devlopment then you need to use static veriable carefully
8th Jul 2020, 5:51 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar