Hi,

Am Montag, 27. Juli 2009 schrieb Craig Ringer:
> On Sat, 2009-07-25 at 17:12 +0200, Dominik Seichter wrote:
> > PdfTable::SetColumnWidth is inlined. So even if PoDoFo allocates the
> > memory itself and copies the array, the allocator of your application is
> > used instead of the allocator of the PoDoFo dll.
>
> That's a PoDoFo bug, then. It's not safe to (directly) allocate or free
> heap memory in an inlined function, because it only works if the same
> runtime library is used in the shared library and the executable linking
> to the library.
>
> There's also no point inlining functions that call new / delete /
> malloc / free, because the memory allocation is dramatically more
> expensive than a mere function call is.
You are right.

> Using STL classes that may perform allocations internally is fine since
> they tend to carry their own std::allocator instance (or reference,
> anyway) around with them.

I will work tomorrow on fixing this issues. I will also add a paragraph to 
CODINGSTYLE.txt .

best regards,
        Dom

-- 
**********************************************************************
Dominik Seichter - [email protected]
KRename  - http://www.krename.net  - Powerful batch renamer for KDE
KBarcode - http://www.kbarcode.net - Barcode and label printing
PoDoFo - http://podofo.sf.net - PDF generation and parsing library
SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game,  for KDE
Alan - http://alan.sf.net - A Turing Machine in Java
**********************************************************************

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to