Hi Parch, > Is the idea to make sure that the new and delete > operations, which are global in scop and 'control' access to heap > memory, are trustworthy? I suspect the reason for the new/delete pair is because the Dll does not provide functions for acquiring and freeing memory from with in the Dll. The example which comes to mind are the various Net* API's from Microsoft.
Take NetUserGetInfo() and NetAPIBufferFree() as examples. NetUserGetInfo() returns a Dll allocated buffer, and NetAPIBufferFree() frees the buffer. If one uses different versions of the runtime (one to allocate and the other to free), corruption could occur. So the Dll offers a function which creates (returns) an allocation, and a function to destroy the allocation. Jeff On 7/27/07, Parch <[EMAIL PROTECTED]> wrote: > > I think Crypto++ seems a little unusual in that it does this special > new/delete stuff. Is the idea to make sure that the new and delete > operations, which are global in scop and 'control' access to heap > memory, are trustworthy? Or unusual in that it overrides new/delete > within the DLL? > > [ SNIP ] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [EMAIL PROTECTED] More information about Crypto++ and this group is available at http://www.cryptopp.com. -~----------~----~----~----~------~----~------~--~---
