Hello On Fri, 25 May 2007, Nathan Mittler wrote:
> FYI, we're not planning on making any changes to activemq-cpp to address the > shortcomings of other compilers. > > Regarding the destroy methods for deallocating amq-cpp resources, do you > think this would be required for clients that are built with newer msvc > compilers? Would it also be a problem for gcc or just msvc? Firstly, I think this is a Microsoft compiler only problem. Where most people run into this issue is when they try to use some code built in Debug mode together with some code built in Release mode. Your objects get allocated on a special debug heap when you create them in debug code, which allows the Microsoft runtime to debug all kinds of interesting error conditions. However, you also run into this problem when you have different parts of your program compiled with different versions of Visual Studio. Although all your code might be built in release mode, depending on the runtime it is linked against (static link to MSVC 7.1 runtime, static link to MSVC 8.0, or dynamic link to 7.1 or 8.0), your objects end up on a different heap and deleting them in code that expects them on another heap blows up. I've found a reference that discusses this issue in more detail: http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx Cheers, Albert