poppler_annot_text_new etc leak memory
Attaching minimal example to reproduce the bug: memleak_example.c
PopplerAnnot *poppler_annot_text_new(PopplerDocument *doc, PopplerRectangle *rect)
{
Annot *annot;
PDFRectangle pdf_rect(rect->x1, rect->y1, rect->x2, rect->y2);
annot = new AnnotText(doc->doc, &pdf_rect);
return _poppler_annot_text_new(annot);
}
The problem is that at the end of poppler_annot_text_new the annot object still thinks it has two references, even though only has one.