Hi, What is the best/safest place to do cleanups at application level?
I am creating a single instance of DefaultHttpClient when the application starts up. Rest of the activities will be ustilizing same instance of client. Now I want to release all resources associated with it( or in other words make the following call client.getConnectionManager().shutdown()) only one time i.e. when the application terminates and not on onPause because that will defeat my purpose. so if I override onTerminate and onLowMemory methods and put the connection release code in both methods will that ensure that my cleanup code will definitely be called. The docs says onTerminate may not get called in some cases..so will overriding onLowMemory ensure that all cases get covered? Please advise Thanks Vikas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---