1
0
mirror of https://github.com/Escartem/AnimeWwise.git synced 2026-06-09 02:01:32 +08:00

fix memory issues

This commit is contained in:
Escartem
2024-07-23 15:03:00 +02:00
parent 6472ce2b01
commit d96771c60d
5 changed files with 21 additions and 7 deletions

View File

@@ -14,7 +14,6 @@ from allocator import Allocator
cwd = os.getcwd()
path = lambda path: os.path.join(cwd, path)
call = lambda args: subprocess.call(args, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
allocator = Allocator()
skips = "000000000" # used for debugging
@@ -40,6 +39,8 @@ class WwiseExtract:
"temp": tempfile.TemporaryDirectory()
}
self.allocator = Allocator()
# self.progress = progress
def path(self, base, path):
@@ -374,3 +375,9 @@ class WwiseExtract:
# allocator.load_file(os.path.join(_input, "2050.pck"))
# allocator.read_at("2050.pck", 0, 0)
pass
### other ###
def reset(self):
if self.mapper is not None:
self.mapper.reset()
self.allocator.free_mem()