Mark Rogers wrote: > > I’m not sure if this a problem or just a restriction. There are heap > corruption problems with std::strings passed across the PoDoFo > interface when the following conditions are true: > > > > - PoDoFo is compiled as a Windows DLL > > - The shared C runtime DLL isn’t being used for both caller > and PoDoFo (i.e. not an issue when both use the shared runtime) >
Yes, that's a restriction; you'll find it explained in CODINGSTYLE.txt; or, as I recently proposed: 3.7 Memory allocations in inlined methods It's not safe to (directly) allocate or free heap memory in an inlined function, because it can cause crashes on MS Windows systems if the runtime library used in the shared library is different from the one used by the executable calling that DLL. Using malloc and/or new in inlined methods will lead to crashes on MS Windows systems. This is only an issue for OSes which run shared libraries as independant processes. (Neither Linux nor UNIX do this.) ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users