Skip to content

Commit

Permalink
更新README
Browse files Browse the repository at this point in the history
增加说明,socialHelper需要在界面销毁时调用clear方法
  • Loading branch information
liujinwei committed Sep 13, 2018
1 parent e929299 commit a39f081
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,20 @@ protected void onNewIntent(Intent intent) {

**其中对于SocialHelper的实例,可以像Demo中一样使用一个工具简单封装成单例来使用。**

**5、销毁**

```
@Override
protected void onDestroy() {
super.onDestroy();
if (socialHelper != null) {
socialHelper.clear();
}
}
```

在onDestroy方法中调用socialHelper.clear()方法,注销掉可能注册的广播以及把activity引用赋为空。

### Release Log

**v1.0.9:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,12 @@ private String toString(ThirdInfoEntity info) {
", platform='" + info.getPlatform() + '\'' +
'}';
}

@Override
protected void onDestroy() {
super.onDestroy();
if (socialHelper != null) {
socialHelper.clear();
}
}
}

0 comments on commit a39f081

Please sign in to comment.