Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I have an app that runs all the time in background. One concern that's always on the back of my mind is memory leaks not caught during development/testing of the app. It might be small, or infrequent, or it might be triggered by corner use-cases.

As a fall back, after all due diligence during dev/testing, is it a reasonable idea for my app to relaunch itself as a last-resort measure to clean up memory?

If you know any pitfalls with this approach, appreciate your sharing.

Can anyone also share some insight as of the capability of BREW's garbage collection on application's exit?

Thanks,
Jian

BREW memory management marks the each memory based on its module. When the module is unloaded, all the module's unfreed memory are release (Garbage collection). Here module means the mif file. In a mif file, there can be more than one applet & one extension.
If you're planning for any fallback strategy, it is recommended that keep your background application as a separate module and relaunch your application when your require.
-empeegee

BREW memory management marks the each memory based on its module. When the module is unloaded, all the module's unfreed memory are release (Garbage collection). Here module means the mif file. In a mif file, there can be more than one applet & one extension.
If you're planning for any fallback strategy, it is recommended that keep your background application as a separate module and relaunch your application when your require.
-empeegee