Android Question Activities, Classes and memory allocation

tkristensen

Member
Licensed User
Longtime User
We have a large application. We just added a couple of pretty large classes (specifically anotherdatepicker and the timeWheel class). Both classes are decently large.

To use them we have to instantiate them in the sub globals in the main activity.

The issue is this is using a large amount of memory (to the point it doesn't run correctly on some tablets) that unless I am wrong, will never be picked up by garbage collection.

Really what I want to do is create the class, use it when appropriate and release all the memory used by the class each time I use it. I do not want to have the entire class in memory all the time.

How do you do this without a dispose method etc?

Do I need to have a deinitialize routine in both classes to manually release what the classes allocate in local and class variables?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…