|
On 26.11.2010 16:54, steve donovan wrote:
If pointers returned by malloc aren't freed by other dlls and things like FILE* aren't passed across dll borders, nothing wrong may happen as far as I understand. If a dll does pass such stuff around, it won't be usable from any language other than C/C++ and would cause all the mentioned problems with runtime dlls when used from C/C++. So, in my opinion it's definitely a bug, but I'm not a C guy. Personally I prefer to link CRT statically.But, if it calls any C runtime functions, then that runtime's allocator may kick in, and you are back where you started. Most C extensions take the lazy way out and just use malloc (or strdup, etc) - naturally they wish to remain portable!
Thanks for the link. -- Best regards, Sergey Rozhenko mailto:sergroj@mail.ru