I am using the following code to removes childs on every viewgroup:
protected void onDestroy() {
super.onDestroy();
this.liberarMemoria();
}
public
Remove that line? Or at least check if the operation is supported with try
and catch
.
Also, it is a bit confusing to want to do this at all in a method called unbindDrawables
, unless it is just a badly named method (doesn't describe what it does fully).
Are you calling all of this in onDestroy
? If so, is there benefit from doing this? I was under the impression that the system takes care of this sort of thing for you.