facebookincubator / spectrum

A client-side image transcoding library.
https://libspectrum.io
MIT License
1.99k stars 165 forks source link

Fix ScalingScanlineProcessingBlock memory leaks #204

Closed maattam closed 4 years ago

maattam commented 4 years ago

This fixes #196

I noticed that every time scaling is used, the library leaks a significant amount of native heap memory (tested on Android). I traced the problem to ScalingScanlineProcessingBlock module, where the Scanline objects were not correctly freed for each processed input scanline.

I verified this fix on Android only, since the changes are quite trivial.

cuva commented 4 years ago

Good catch - thanks so much for the fix @maattam 🥇! Will get it merged soon!

lambdapioneer commented 4 years ago

Nice one 🙌

facebook-github-bot commented 4 years ago

@cuva merged this pull request in facebookincubator/spectrum@075b34805f5890c5366a03626fc10c5099ff6644.