rxjava源码解析 线程切换
//www.greatytc.com/p/a36e5d257b03
https://juejin.im/post/5c05f43ce51d4503fb449c7b subscribeOn由下到上 observeOn由上到下
http://www.jcodecraeer.com/a/anzhuokaifa/2018/0417/9599.html
aac源码解析及实践(开源flutter和aac)
//www.greatytc.com/p/4e0a5400e36f
//www.greatytc.com/p/64a0be25a7d5
dagger2源码解析
//www.greatytc.com/p/c1411ff6c975
glide源码功能性解读
okhttp源码功能性解读
retrofit源码功能性解读
webview
https://juejin.im/entry/5c344593f265da61483bc76a
微信反编译实现自动回复,自动加好友,获取好友和群成员列表
kotlin高阶函数和协成
协成 https://juejin.im/post/5a90e3836fb9a063592bebe2 https://juejin.im/entry/588ff7cd2f301e0069fd4fec 协成适配retrofit https://github.com/gildor/kotlin-coroutines-retrofit
项目内存泄漏案例
一.progress取消时取消网络,出现内存泄露(弱网环境极容易复现)
1,使用rxjava处理:
在dialog执行dismiss的时候调用rxjava的dispose
2,在livedata处理:
中断网络, 通过result.removeSource(apiResponse)即可实现
override fun adapt(call: Call<HttpResponse<R>>): LiveData<ApiResponse<R>> {
return object : LiveData<ApiResponse<R>>() {
private var started = AtomicBoolean(false)
override fun onActive() { //当remove掉LiveData的时候,下面的对象被直接销毁,所以网络被中断
super.onActive()
if (started.compareAndSet(false, true)) {
call.enqueue(object : Callback<HttpResponse<R>> {
override fun onResponse(call: Call<HttpResponse<R>>, response: Response<HttpResponse<R>>) {
postValue(ApiResponse.create(response))
}
override fun onFailure(call: Call<HttpResponse<R>>, throwable: Throwable) {
postValue(ApiResponse.create(throwable))
}
})
}
}
}
}
vue 小程序 网络再封装及坑爹bug
bug:edittext文字浮层层级太高,使用coverView处理
越南新闻后端部分功能实践
goLand后端实践