Trinkle23897 / Fast-Poisson-Image-Editing

A fast poisson image editing implementation that can utilize multi-core CPU or GPU to handle a high-resolution image input.

Home Page:https://fpie.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

incorrect free memory

thuliu-yt16 opened this issue · comments

Putting multiple array pointers in a single delete[] line is incorrect. E.g., in base_solver.h:


and
delete[] mask, tgt, grad;

They lead to memory leaks.

Instead, they should be

    delete[]  A;
    delete[]  B;
    delete[]  X;

and

    delete[]  mask;
    delete[]  tgt;
    delete[]  grad;