leaningtech / cheerpj-meta

Run Java 8 applications, libraries, applets, Java Web Start, and Oracle Forms on the web without legacy plugins.
https://labs.leaningtech.com/cheerpj
445 stars 21 forks source link

Support removing files mounted to /str #97

Closed oeway closed 3 years ago

oeway commented 3 years ago

Would be nice to support removing files mounted to /str, to lower the memory footprint. I made a function for that for ImageJ.JS:

function cheerpjRemoveStringFile(name) {
  var mount = cheerpjGetFSMountForPath(name);
  assert(mount instanceof CheerpJDataFolder);
  delete mount.files[name.substr(mount.mountPoint.length - 1)]
  delete cjFileCache[name];
}

Maybe something like this should be integrated to or provided from the official loader?

alexp-sssup commented 3 years ago

cheerpjRemoveStringFile is implemented in endpoint https://cjrtnc.leaningtech.com/20201217/loader.js