引用链
源码
case 1:
ClipboardManager clipboard = (ClipboardManager)
getSystemService(Context.CLIPBOARD_SERVICE);
/** 替换UBB标签 **/
String Text = TopicMatcherUtil.ReplaceLabel(commentContent);
clipboard.setText(String.valueOf(Text));
UIHelper.makeText(ArticleCommentListActivity.this, "复制成功");
break;
Activity Context 改为 getApplicationContext()
case 1:
ClipboardManager clipboard = (ClipboardManager)
this.getApplicationContext().getSystemService(Context.CLIPBOARD_SERVICE);
/** 替换UBB标签 **/
String Text = TopicMatcherUtil.ReplaceLabel(commentContent);
clipboard.setText(String.valueOf(Text));
UIHelper.makeText(ArticleCommentListActivity.this, "复制成功");
break;
再次验证,发现无内存泄露,收获 18M 内存