Languages

Menu
Sites
Language
Is there a way to safeguard application from OOM in Tizen ?

I am creating an background application that will launch the another application. Is there a way to safe guard my background application not to get killed because of OOM(Out of Memory)

Thanks,

Anil.

Responses

5 Replies
hgw7

You can handle such events by implementing the Tizen::App::App or Tizen::App::UiApp interfaces which contains the OnLowMemory() callback. Please refer -> https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.apireference/classTizen_1_1App_1_1App.html#a128a329e38dd241b1c40d4b8b1dcece3

Alex Ashirov

Hi,

Thanks! But as far as I understand using this callback we can only be notified about low memory condition before application will be closed. Is it possible to prevent the application from closing?
 

hgw7

I don't think it is called just before exiting. According the help content, it should be invoked if the system's memory is running low. You can deallocate resources in such a case and try. The OnAppWillTerminate() callback has to get invoked before the application exits automatically.

Alex Dem

Hi,
You could try to use this api:
Tizen::App::App::OnAppWillTerminate
The OnAppWillTerminate() method returns false to prevent the application from getting terminated...
App should stays in running state anyway (But I did not check during OOM).
Alexey.

Alex Ashirov

Hi,

According to the documentation: "The OnAppWillTerminate() event handler is called only when the UI application is terminated by the End key press." So, I am not sure that it will be called on the Low memory condition.