diff --git a/.cargo/config.toml b/.cargo/config.toml index 77777bb8..22ba68aa 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -19,6 +19,8 @@ rustflags = [ "--cfg=web_sys_unstable_apis", "-C", "target-feature=+atomics,+bulk-memory,+mutable-globals", + "-C", + "link-arg=--max-memory=4294967296", "-Z", "threads=8", ] diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs index 7f197a57..950a1174 100644 --- a/crates/core/src/lib.rs +++ b/crates/core/src/lib.rs @@ -404,6 +404,8 @@ impl<'res> UpdateState<'res> { self.edit_windows.clean(|w| !w.requires_filesystem()); self.edit_tabs.clean(|t| !t.requires_filesystem()); self.audio.clear_sinks(); // audio loads files borrows from the filesystem. unloading while they are playing is a crash + self.graphics.atlas_loader.clear(); + self.graphics.texture_loader.clear(); self.filesystem.unload_project(); *self.project_config = None; self.data.unload();