We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public static Observable<List> getPhotoList() { return sNewsService.getPhotoList() .subscribeOn(Schedulers.io()) .unsubscribeOn(Schedulers.io()) .subscribeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread()); } 如果获取接口数据都是使用静态方法 不会导致内存溢出吗?如果会,还有什么好的方法来解决这个问题呢?
The text was updated successfully, but these errors were encountered:
不会,实例方法和静态方法一样都要占用内存的,至于什么时候用哪个要看实际开发场景,你网上搜下资料了解下
Sorry, something went wrong.
No branches or pull requests
public static Observable<List> getPhotoList() {
return sNewsService.getPhotoList()
.subscribeOn(Schedulers.io())
.unsubscribeOn(Schedulers.io())
.subscribeOn(AndroidSchedulers.mainThread())
.observeOn(AndroidSchedulers.mainThread());
}
如果获取接口数据都是使用静态方法 不会导致内存溢出吗?如果会,还有什么好的方法来解决这个问题呢?
The text was updated successfully, but these errors were encountered: