[omniORB] Corba union waste of space?

Bailey, Kendall BaileyK at schneider.com
Tue Jan 6 10:47:16 GMT 2009


> 2. (ugly trick): In order for placement new to work 100% correct, I need to call
> destructors explicitely. Unfortunately I only have the type name
> :CORBA::String_member and need to call ~_CORBA_String_member(), because it's a
> typedef. My ugly hack is to replace ::CORBA:: with _CORBA_, but I really do not
> like it, as it will probably break with other types.
>
>
> Any ideas?
>

If I understand the issue, it seems a simple template function would do the trick.  Something like this?

template<typename T>
destroy_union_member( T* p )
{
        p->~T();
}


----
Kendall Bailey




More information about the omniORB-list mailing list