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. 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. -- Craig Ringer ------------------------------------------------------------------------------ _______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
