lastbattle / Harepacker-resurrected

All in one .wz file/map editor for MapleStory game files
Mozilla Public License 2.0
420 stars 158 forks source link

Memory Leak in Insert IMG mode #99

Open fallenleavescn opened 3 years ago

fallenleavescn commented 3 years ago

When I try to insert a lot of IMG, the memory will continue to grow and will not be collected, I had to keep restarting the program to get enough memory. 8(H9VII 3G4IZ21}1 $UL8Q

fallenleavescn commented 3 years ago

XWP5XH0ZIRPX39_P27 B`WW

fallenleavescn commented 3 years ago

Sorry, I forgot to mention that closing the WZ file does not free memory.😅

fallenleavescn commented 3 years ago

Sorry, I forgot to mention that closing the WZ file does not free memory.😅

lastbattle commented 3 years ago

Looking into it 👀

lastbattle commented 3 years ago

Do let me know if its already fixed here dd948a31383441ff34e979fda129a255b4e8a213 https://github.com/lastbattle/Harepacker-resurrected/releases/tag/4.2

I'm seeing a drop in memory after unloading or saving the WZ. image

Due to the way WzPngProperty in MapleLib works today, adding or importing image does take a lot of memory, that can only be fixed when other image formats are supported via CompressPng.

Moreover, the speed of compression and decompression could also be improved by SIMD vectorising.