Skip to content

Commit 3475970

Browse files
authored
Fix #248 delete javascript reference to released media (#249)
Co-authored-by: Nate Dudenhoeffer <[email protected]>
1 parent 94503df commit 3475970

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

www/Media.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ Media.prototype.resumeRecord = function() {
156156
* Release the resources.
157157
*/
158158
Media.prototype.release = function() {
159-
exec(null, this.errorCallback, "Media", "release", [this.id]);
159+
var me = this;
160+
exec(function() {
161+
delete mediaObjects[me.id];
162+
}, this.errorCallback, "Media", "release", [this.id]);
160163
};
161164

162165
/**

0 commit comments

Comments
 (0)