Skip to content

Commit

Permalink
修复部分URL.createObjectURL未revoke导致的内存泄露
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangyuecn committed Oct 23, 2019
1 parent d69df74 commit b02e458
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ rec.open(function(){//打开麦克风授权获得相关资源
var audio=document.createElement("audio");
audio.controls=true;
document.body.appendChild(audio);
//简单的一哔
//简单的一哔,注意不用了时需要revokeObjectURL,否则霸占内存
audio.src=(window.URL||webkitURL).createObjectURL(blob);
audio.play();

Expand Down
2 changes: 1 addition & 1 deletion dist/engine/mp3.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/recorder-core.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
["%c "
," "
," "
," %c FBI WARNING %c "
," %c REC WARNING %c "
," "
," "
,"%c 请不要试图阅读本demo的源码,不然你会去想这么丑的代码是谁写的 "
Expand Down
2 changes: 1 addition & 1 deletion recorder.mp3.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit b02e458

Please sign in to comment.