[omniORB] Allocation of memory for sequence "vars"

Green, Wallace J wallace.j.green at boeing.com
Tue Sep 21 08:42:05 BST 2004


I am in the process of converting from a previous ORB to the omni ORB on
a Linux system (PC).

I have a very simple sequence that I am allocating and would like to
check that the allocation was successful.

The IDL is :

    interface SEQ {
    
        enum ABC { want, more };
        typedef sequence<ABC> ABCseq;
    };

And the code (C++) I wish to convert is:
 
   SEQ::ABCseq_var me = new SEQ::ABCseq();
    if(me == NULL) printf("ERROR\n");

When I compile this, using OMNI, I get an error on the "me == NULL" test
to the effect that no such comparison is available.

So, under OMNI, what is the appropraite way to verify that the
allocation via the "new" was successful?


Thank you,

Wally Green



More information about the omniORB-list mailing list