sigmadelta
10/24/2024, 5:41 PMImageLoader like this:
setSingletonImageLoaderFactory { context ->
        ImageLoader.Builder(context)
            .diskCachePolicy(CachePolicy.ENABLED)
            .networkCachePolicy(CachePolicy.ENABLED)
            .diskCache {
                DiskCache.Builder().directory(FileSystem.SYSTEM_TEMPORARY_DIRECTORY/"coil_img_cache")
                    .maxSizeBytes(256L * 1024 * 1024) /// 256MB
                        .build()
            }
            .crossfade(true)
            .build()
    }
But when I retrieve the singleton using SingletonImageLoader.get(LocalPlatformContext.current) , and even forcibly clear out all caches:
imgLoader.diskCache?.clear()
imgLoader.memoryCache?.clear()
The image still stays in memory until I clear the cache in the app-options on Android. Does anyone have a better idea on how to approach this? Thanks!Colin White
10/24/2024, 11:53 PMclear() code you posted to clean both caches as expected. Maybe you’re somehow referencing different ImageLoader instances? You can check the imageLoader.toString() on the instance you set + the instance you got to verifysigmadelta
10/25/2024, 7:10 AM