[omniORB] String handling problem with VC7.1

Matej Kenda matejken at gmail.com
Thu Mar 22 17:42:35 GMT 2007


Hi Severin,

2007/3/22, Ecker Severin <Severin.Ecker at arcs.ac.at>:
>
> static inline void free(char* s) {
>   if (s && s != empty_string) delete[] s;
> }
>
> For some reason the condition hold true and attempts are made to delete
> an invalid string resource. As you can see above I just want to assign a
> string to a completely new and fresh corba object (the id string) which
> does have the value 'empty_string' at the time of my assignment
> statement.

I suspect that you are using non-debug and debug versions of MS C
runtime library: one is used by the omniORB and the other is used by
your application.

The string gets allocated in one heap and wants to get deallocated in another.

HTH,

Matej
-- 
Matej Kenda, Senior Software Engineer
HERMES SoftLab d.d. (www.hermes-softlab.com), Slovenia



More information about the omniORB-list mailing list