Re: CORBA_free problem
- From: Michael Meeks <michael ximian com>
- To: pvosta unionbio-eu com
- Cc: ORBit list <orbit-list gnome org>
- Subject: Re: CORBA_free problem
- Date: 17 Jul 2003 10:12:52 +0100
Hi Peter,
On Wed, 2003-07-16 at 14:30, Peter Van Osta wrote:
> The structure contains some strings, which all could be freed with
> CORBA_free, but when I want to free the structure itself the application
> crashes.
A CORBA_free does a deep free - ie. if you have:
struct Foo { string a; string b; };
and you get returned a Foo *; then if you do:
CORBA_free (foo->a); // WRONG
CORBA_free (foo->b); // WRONG
CORBA_free (foo); // WRONG
The free (foo) will try to do a deep recursive free of the structure's
contents, and die horribly re-freeing the strings.
Instead just CORBA_free (foo). In fact the 0xdeadbeef is quite specific
though to ORBit _1_ - which is highly non-recommended; please use ORBit2
instead, it's much better :-)
Regards,
Michael.
--
michael@ximian.com <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]