[REBOL] Re: callbacks
From: lmecir::mbox::vol::cz at: 31-Oct-2007 23:50
Maxim Olivier-Adlhoch napsal(a):
> I saw that ... but althouh it might fix the issue, my problem is that I have
> no idea about the length of the returned data before the call... and it can
> be huge. I could have to make 100kb or even larger copies.
> in the end, if that's the only thing that makes the system stable, I'll end
> up doing this (but I still have to check if it really alleviates the
> problem, cause its not totally clear why and how the GC trips up like that).
> I'm still open to ideas about why this all happens in the first place and
> how to solve it.
> On 10/30/07, sqlab <sqlab-gmx.net> wrote:
>> Did you try to use char-array in order to be on the safe side ?
>> Maxim Olivier-Adlhoch wrote:
>>> I'm about to go mad!
a couple of notes:
1) CALLBACK! versus CALLBACK - this is a recent R2 change that might
have been unintended
2) MEMORY? versus GC: the MEMORY? function does not protect the memory
against GC. You need to make sure the memory is protected by other
means. (see http://www.rebol.com/docs/library.html#Garbage )