Re: [Cxxgui-devel] RE: C++ GUI library
Brought to you by:
davidturner
From: Daniel J. <dan...@em...> - 2004-03-12 15:10:41
|
David Turner wrote: > #ifdef MSC_VER > #include <malloc.h> > #define TEMP_ALLOC(size) _alloca(size) > #define TEMP_FREE(ptr) > #elseif defined(CYGWIN) > #define TEMP_ALLOC(size) alloca(size) > #define TEMP_FREE(ptr) > #else > #define TEMP_ALLOC(size) malloc(size) > #define TEMP_FREE(ptr) free(ptr) > #endif > > Can you fix this, please? OK, I've done it this way, but I'm not sure about it. Every compiler that's available to me (Visual C++ 6, Borland, mingw, cygwin, Digital Mars) supports alloca, _alloca or both, so I don't think TEMP_FREE is really needed. I'm worried about exception safety when using it, it seems like it could easily lead to leaks. > CreateThreadEx() is appropriate, I think. > [snip] > I'll look into this. Thanks, I've only ever used boost for multithreading, so I wouldn't know where to start here. Daniel |