Say I have a Fragment and in my Fragment I do this:
resultAdapter = new ResultAdapter(this, search);
listView.setAdapter(resultAdapter);
and the constructor of my adapter is:
public ResultAdapter(Fragment fragment) {
this.fragment = fragment;
}
My Fragment then holds a reference to the adapter and the adapter holds a reference to the fragment. Would this prevent the GC to collect both om them?