Re: Strings in ORBit



On Mon, 6 Nov 2000, Rene Maldonado wrote:

> Hi All,
> 
> I have a problem I can't pass a string from the server to the client, in
> fact, a pass the string, from the point of view of the client,
> everithing is OK, I call the client, an the string appear on the screen,
> but on the server side an error occur:
> 
> ** ERROR **: file allocators.c: line 114 (ORBit_free): assertion failed:
> (block->magic == 0xdeadbeef)
> aborting...
> Aborted (core dumped)
> 
> Any one know what can I do???
> 
> if I pass an integer, a short, or any numeric type, nothing hapens,
> everithing is OK.

When you return a value from the implementation, you are also returning
ownership of the memory associated with that value (if any). Numeric types
are returned by value, so there is no associated memory to return.
Strings, on the other hand, have associated memory that must be copied if
you do not wish to return ownership of the memory for the existing value.

-- Elliot
[ "In a democracy, the government is the people," Milo explained. "We're people,
aren't we? So we might just as well keep the money and eliminate the middleman." ]
							- Catch-22






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