Skip to content

Glide模块在退出页面的时候没有清空memory缓存 #1

@shijiacheng

Description

@shijiacheng

请问一下您:Glide那个模块在页面销毁的时候没有清空memory缓存,您有发现这个问题吗?

FragmentManager fm = activity.getFragmentManager();
        RequestManagerFragment current = (RequestManagerFragment) fm.findFragmentByTag("com.jv.code.glide");
        if (current == null) {
            current = new RequestManagerFragment();
            fm.beginTransaction().add(current, "com.jv.code.glide").commitAllowingStateLoss();
        }
        return new BitmapRequest(activity);

这个地方会反复创建RequestManagerFragment,因为每次fm.findFragmentByTag获取到的都是null,这个是为什么呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions