mirror of
https://github.com/linuxserver/emulatorjs.git
synced 2026-02-23 00:01:26 +08:00
try to help browser garbage collection a bit by null pointing large data arrays
This commit is contained in:
parent
d7588a6fee
commit
26342de046
@ -118,6 +118,7 @@ async function downloadGame(dlGame) {
|
||||
if (rom.split('.').pop() !== 'bin') {
|
||||
var romFile = await downloadFile(EJS_gameUrl);
|
||||
fs.appendFileSync(retroArchDir + 'roms/' + rom, new Buffer(romFile));
|
||||
romFile = null;
|
||||
} else {
|
||||
var EJS_gameUrlCue = EJS_gameUrl.split('.').shift() + '.cue';
|
||||
var cue = rom.split('.').shift() + '.cue';
|
||||
@ -125,6 +126,7 @@ async function downloadGame(dlGame) {
|
||||
var romFile = await downloadFile(EJS_gameUrl);
|
||||
fs.appendFileSync(retroArchDir + 'roms/' + cue, new Buffer(cueFile));
|
||||
fs.appendFileSync(retroArchDir + 'roms/' + rom, new Buffer(romFile));
|
||||
romFile = null;
|
||||
};
|
||||
};
|
||||
$('#loading').empty();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user