Patch a memory leak caused by an earlier failsafe

A global object AllPlaylists was added back in v2 as a hardfix for an issue where playlists would continue to send updates after the channel was reloaded and the playlist object was obsolete.  This condition should no longer happen due to other fixes, so the only thing this object was doing was wasting memory.
This commit is contained in:
calzoneman 2014-04-10 16:10:55 -05:00
parent 324fa6c81a
commit e973813718
3 changed files with 2 additions and 9 deletions

View file

@ -15,7 +15,6 @@ var Media = require("./media").Media;
var util = require("./utilities");
var vimeoWorkaround = require("./get-info").vimeoWorkaround;
var Config = require("./config");
var AllPlaylists = {};
function PlaylistItem(media, uid) {
this.media = media;
@ -37,11 +36,6 @@ PlaylistItem.prototype.pack = function() {
function Playlist(chan) {
var name = chan.uniqueName;
if(name in AllPlaylists && AllPlaylists[name]) {
var pl = AllPlaylists[name];
if(!pl.dead)
pl.die();
}
this.items = new ULList();
this.current = null;
this.next_uid = 0;
@ -55,7 +49,6 @@ function Playlist(chan) {
"remove": [],
};
this.fnqueue = new AsyncQueue();
AllPlaylists[name] = this;
this.channel = chan;
this.server = chan.server;

View file

@ -9,7 +9,7 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
const VERSION = "3.0.1";
const VERSION = "3.0.2";
var singleton = null;
var Config = require("./config");

View file

@ -2,7 +2,7 @@
"author": "Calvin Montgomery",
"name": "CyTube",
"description": "Online media synchronizer and chat",
"version": "3.0.1",
"version": "3.0.2",
"repository": {
"url": "http://github.com/calzoneman/sync"
},