[omniORB] [omniORB 2.8.0] problem with delete of the output sequence of structs

Gennady Agranov agranov@synquiry.com
Mon, 21 Feb 2000 22:09:49 -0500 (EST)


Hi!

IDL piece:

>>>    struct model_info {
>>>      int model_type;
>>>      int server; 
>>>      string        name; 
>>>      string        description;
>>>      boolean       not_saved;  
>>>    };

>>>    typedef sequence <model_info> models_info;

>>>    models_info get_models_info(
>>>     in session_id session) raises (star_exception);


After I successfully called get_models_info and used 
the return value I presumed that I have to call delete
on the returned model_info_ptr. But MSVC6 runtime is not
happy (see the end of this mail). I understand that I 
could corrupt the memory somewhere else. My question is 
should I or should not free the returned pointer ?

Thanks,
 Gena


NTDLL! 77f7629c()
NTDLL! 77f8322e()
KERNEL32! 77f12e09()
_CrtIsValidHeapPointer(const void * 0x00a07580) line 1606
_free_dbg_lk(void * 0x00a07580, int 1) line 1011 + 9 bytes
_free_dbg(void * 0x00a07580, int 1) line 970 + 13 bytes
operator delete(void * 0x00a07580) line 49 + 16 bytes
_CORBA_String_member::~_CORBA_String_member() line 180 + 37 bytes
ariadne::ir::model_info::~model_info() + 68 bytes
ARIADNE! `eh vector destructor iterator'(void *,unsigned int,int,void (*)(void *)) + 94 bytes
ariadne::ir::model_info::`vector deleting destructor'(unsigned int 3) + 62 bytes
_CORBA_Sequence<ariadne::ir::model_info>::freebuf(ariadne::ir::model_info * 0x00f12f34) line 137 + 34 bytes
_CORBA_Sequence<ariadne::ir::model_info>::~_CORBA_Sequence<ariadne::ir::model_info>() line 179 + 33 bytes
_CORBA_Unbounded_Sequence<ariadne::ir::model_info>::~_CORBA_Unbounded_Sequence<ariadne::ir::model_info>() line 308 + 37 bytes
ariadne::ir::models_info::~models_info() + 37 bytes
ariadne::ir::models_info::`scalar deleting destructor'(unsigned int 1) + 37 bytes
AriadneStar::get_models_info(AriadneStar * const 0x00f11284, unsigned long 29, __MIDL___MIDL_itf_ariadne_0000_0010 * 0x0012f854) line 262 + 28 bytes