Re: memory leak problem and convert question



Hi Stephan,

instead of

>  retval=(CORBA_string) data;

use:

retval = CORBA_string_dup(data);

Cheers,

Marion

On Thu, Apr 29, 2004 at 10:06:38AM +0200, absmeier@fmi.uni-passau.de wrote:
> 
> 
> Hi,
> 
> this is the function of my service. The printf-command works fine but why do I
> always gat a memory leak error at the "return retval;"-command? What did I wrong?
> 
> 
> 
> static CORBA_string
> impl_CORBAZeitTest_Pong_pingpong(impl_POA_CORBAZeitTest_Pong * servant,
>                 const CORBA_char * data,
>                 CORBA_Environment * ev)
> {
>  CORBA_string retval;
> 
>   /* ------   insert method code here   ------ */
> 
>  retval=(CORBA_string) data;
>  printf("%s\n",retval);
> 
> 
>   /* ------ ---------- end ------------ ------ */
> 
>  return retval;
> }
> 
> 
> it was generated by orbit-idl-2 --skeleton-impl. except the lines between insert
> and end.
> 
> 
> 
> And a second question: Are there any functions to convert CORBA_octet to string
> ,int or long long? The CORBA_octet is only a container at the moment.So I'll try
> to not to use 3 fundtions.
> 
> Thanks a lot in advance
> 
> Stephan
> 
> _______________________________________________
> orbit-list mailing list
> orbit-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/orbit-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]