filebytes icon indicating copy to clipboard operation
filebytes copied to clipboard

High memory use, possible leak when reading a MachO file

Open michaeleisel opened this issue 3 years ago • 1 comments

I recently tried to use MachO to read a large (1.3GB) Mach-O dSYM file, and found that it ended up using about 4GB of memory and didn't free that memory even when I tried to get it to be garbage collected. So, it seems like there may be two issues here, one of unnecessarily large memory usage, and the other of a memory leak. Is MachO not just collecting metadata? It seems like that would use almost no memory at all.

michaeleisel avatar Sep 20 '22 19:09 michaeleisel

Hi, many thanks. I assume the reason is that I tried to make things easier accessible, e.g. Strings. Therefore, they get copied at some places. I will look at that.

sashs avatar Sep 21 '22 07:09 sashs