Please, disregard this last patch, it breaks some tests. 

It seems like the way to do it is simply to catch the specific exception in the 
client code and retry after setting a password.

Regards, 

-- 
Palmer Zent
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Friday, February 24, 2012 at 9:21 AM, Palmer Zent wrote:

> Thank you, here is the patch. 
> 
> Regards, 
> 
> -- 
> Palmer Zent
> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
> 
> 
> On Thursday, February 23, 2012 at 8:43 PM, Dominik Seichter wrote:
> 
> > You are on your own, to handle the exception, clean up and throw it
> > again. We do not have special macros to assist you.
> > 
> > Cheers,
> > Dom
> > 
> > On Thu, Feb 23, 2012 at 8:22 PM, Palmer Zent <[email protected] 
> > (mailto:[email protected])> wrote:
> > > Hello,
> > > 
> > > I noticed a memory leak in podofo when the exception stating that an
> > > encryption password is incorrect is thrown.
> > > 
> > > Output from valgrind :
> > > 
> > > ==27745== 9,635 (664 direct, 8,971 indirect) bytes in 1 blocks are
> > > definitely lost in loss record 415 of 417
> > > ==27745==    at 0xB823: malloc (vg_replace_malloc.c:266)
> > > ==27745==    by 0x79468D: operator new(unsigned long) (in
> > > /usr/lib/libstdc++.6.0.9.dylib)
> > > ==27745==    by 0x1012D9: PoDoFo::PdfMemDocument::Load(char const*)
> > > (PdfMemDocument.cpp:164)
> > > ==27745==    by 0x10126C: PoDoFo::PdfMemDocument::PdfMemDocument(char
> > > const*) (PdfMemDocument.cpp:67)
> > > ==27745==    by 0x10120C: PoDoFo::PdfMemDocument::PdfMemDocument(char
> > > const*) (PdfMemDocument.cpp:66)
> > > 
> > > It seems like the PdfParser object that is created in 
> > > PdfMemDocuement::Load
> > > is not deleted when ParseFile fails.
> > > 
> > > I am not sure to understand how exceptions are treated in podofo, could
> > > someone help me find a way to correct this ? I'm guessing a simple 
> > > try/catch
> > > would do the job but is there some kind of macro that should be used 
> > > instead
> > > ?
> > > 
> > > Thanks in advance.
> > > 
> > > Best regards,
> > > 
> > > --
> > > Palmer Zent
> > > Sent with Sparrow
> > > 
> > > 
> > > ------------------------------------------------------------------------------
> > > Virtualization & Cloud Management Using Capacity Planning
> > > Cloud computing makes use of virtualization - but cloud computing
> > > also focuses on allowing computing to be delivered as a service.
> > > http://www.accelacomm.com/jaw/sfnl/114/51521223/
> > > _______________________________________________
> > > Podofo-users mailing list
> > > [email protected] 
> > > (mailto:[email protected])
> > > https://lists.sourceforge.net/lists/listinfo/podofo-users
> > > 
> > 
> > 
> > 
> > 
> 
> 
> 
> Attachments: 
> - PdfMemDocument.cpp.diff
> 


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to