[poppler] Annots & ownership of its objects

Albert Astals Cid aacid at kde.org
Wed Jul 1 11:02:26 PDT 2009

A Dilluns, 29 de juny de 2009, Pino Toscano va escriure:
> Hi,
> currently, an Annots object owns the various Annot* objects thus, if you
> want to keep them, you have to keep the "parent" Annots object around as
> well. My goal is to have each Annot object stored in each "wrapper"
> Annotation object of the Qt4 frontend, but without the need to tie them to
> a Page object. The less "destructive" solution I have so far is a
> takeAnnot() method (see attached patch) which would get an Annot object and
> give its ownership to the callee.
> This also could help the glib frontend, which currently keeps an Annots
> object around for each page.
> What do you think?

Wonder if it makes sense adding a copy() that duplicates the object so you 
don't need to keep Annots around more than a take() one that "breaks" Annots 
setting one of its variables to null.


More information about the poppler mailing list