Summary: | no new/delete operators for structures (Win32+MSVC) | ||
---|---|---|---|
Product: | TAO | Reporter: | Abdul Sowayan <abdullah.sowayan> |
Component: | IDL Compiler | Assignee: | DOC Center Support List (internal) <tao-support> |
Status: | NEW --- | ||
Severity: | enhancement | ||
Priority: | P3 | ||
Version: | 1.5.8 | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 2842 | ||
Bug Blocks: |
Description
Abdul Sowayan
2007-05-23 14:00:09 CDT
Hi, For structures, wouldn't this be as simple as having the IDL compiler generate ACE_ALLOC_HOOK_DECLARE in the structure body? And generate ACE_ALLOC_HOOK_DEFINE(...) in the cpp file? For instance: HEADER FILE: struct A { /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; . . . }; CPP FILE: ACE_ALLOC_HOOK_DEFINE(A) Thanks, Abdul Hi Abdul, Yes, I think that should work. German, can you try to use the macros Abdul has pointed out and handcraft a generated file and see if that works and let us know the results? Regards, Johnny Willemsen Remedy IT Postbus 101 2650 AC Berkel en Rodenrijs The Netherlands www.theaceorb.nl / www.remedy.nl ACE_ALLOC_HOOK_DEFINE uses "new char[]" to allocate memory. I'm not sure why we would want this. Why not just defer to global operators new and delete? Thanks, Adam Adam, It isn't clear to me either why "new char[]" is used either. Maybe when ACE first started out in the early 90s some compilers didn't have it? At any rate, ACE_ALLOC_HOOK needs some enhancements. Look at Bugzilla 2842 for details. http://deuce.doc.wustl.edu/bugzilla/0 Thanks, Abdul added depends, changed severity enhancement |