While going through the android developer site i found this .
it says to avoid memory leak we should release resources in onStop()but how to do so.