diff --git a/www/Media.js b/www/Media.js index 5806b9f6..8a3d4ae6 100644 --- a/www/Media.js +++ b/www/Media.js @@ -156,7 +156,10 @@ Media.prototype.resumeRecord = function() { * Release the resources. */ Media.prototype.release = function() { - exec(null, this.errorCallback, "Media", "release", [this.id]); + var me = this; + exec(function() { + delete mediaObjects[me.id]; + }, this.errorCallback, "Media", "release", [this.id]); }; /**