Hello zyx, hello all,

> zyx <z...@gmx.us> has written on 14 January 2018 at 15:42:
> 
> 
> On Wed, 2017-12-06 at 18:34 +0100, le...@free.fr wrote:
> > After some digging, Chromium / Skia do not store annotations as
> > references, but directly as dictionnary under /Annots.
> > Here is a simple patch which solves it but incorrect : the allocated
> > PdfObject is not deleted afterwards.
> 
>       Hi,
> thanks for the notice and the patch. You are right it is not complete,
> the pAnnot is also leaking and couple more issues had been there.
> I extended your change in revision 1867:
> https://sourceforge.net/p/podofo/code/1867

in that revision in src/doc/PdfPage.cpp:380 (i.e. line 380) there is
a typo: it should be pItem instead of pObj (as in line 384 the index
pItem is used for storing, so it should be used for querying also).
The object pObj is an array, you didn't want that as a map key, right?

An issue is also that you replaced the construct (*iterator).member
by iterator->member which is AFAIK non-standard, so (possibly at least)
non-portable. This is because iterator types don't have to be pointers
and aren't (otherwise) required to have an operator-> but only (see [1])
operator*() const for dereferencing the iterator. So please change it
back or please give me a technical reason why that isn't practical
for you.

> 
>       Bye,
>       zyx
> 

[1] http://en.cppreference.com/w/cpp/concept/Iterator
Example implementation in http://en.cppreference.com/w/cpp/iterator/iterator

Best regards, mabri

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to