[omniORB] [C++] memory allocation

Martin B. 0xCDCDCDCD at gmx.at
Tue Jan 25 16:59:17 GMT 2011


On 25.01.2011 09:58, Hung Ta Viet wrote:
> Hi omniORB friends,
>
> You're the experts of omniORB, I think you're expert in C++, also.
>
> I have a question, who knows is very welcome:
>
> Assume we have a fragment of code:
>
> typedef char String [46];
> String* pStr = new String[10];
>
> A question are:
> 1. How is memory allocated for the pointer pStr?
> 2. If we use delete pStr; , is the memory allocated for the pointer
> deleted completely?
>

For general C++ questions let me recommend the following resources:

C++ FAQ Lite - http://www.parashift.com/c++-faq-lite/

nntp - comp.lang.c++
http://groups.google.com/group/comp.lang.c++/topics

nntp - comp.lang.c++.moderated
http://groups.google.com/group/comp.lang.c++.moderated/topics

cheers,
Martin



More information about the omniORB-list mailing list