doublex

Results 36 comments of doublex

std::variant is C++17, C++11 would be nice

E.g. this file: ![leak](https://user-images.githubusercontent.com/274624/55652572-25d31680-57ec-11e9-8323-ec038fb634ad.png) Code ```` pngquant( "/tmp/leak.png", "/tmp/leak-opt.png" ); ````

If it helps I can provide more PNGs.

Testcase: [testcase.c.gz](https://github.com/kornelski/pngquant/files/3316726/testcase.c.gz) Steps to reproduce: ```` cd /tmp wget https://github.com/kornelski/pngquant/files/3316726/testcase.c.gz gzip -d testcase.c.gz git clone https://github.com/ImageOptim/libimagequant.git gcc -g -fsanitize=address -fno-omit-frame-pointer -o testcase testcase.c libimagequant/blur.c libimagequant/kmeans.c libimagequant/libimagequant.c libimagequant/mediancut.c libimagequant/mempool.c libimagequant/nearest.c libimagequant/pam.c...

This patch eliminates the memleak: ```` *** a/libimagequant.c 2019-06-22 20:46:26.599983591 +0200 --- b/libimagequant.c 2019-06-22 20:46:13.031177165 +0200 *************** LIQ_EXPORT LIQ_NONNULL liq_error liq_his *** 560,565 **** --- 560,567 ---- LIQ_NONNULL static bool...

@kornelski Maybe the fix is to avoid calling "liq_image_use_low_memory()" twice? Please do not miss "testcase.c.gz".

The great thing of 'php-svg' is that it has so little dependency. Really great if you don't need to render super complex SVGs.