[chuck-users] Assigning to appended array locations (bug?)
signal.automatique at gmail.com
Sun Sep 28 16:39:13 EDT 2008
Strangely, the following works fine.
I'm increasingly suspecting "@" is ChucKian for saying "please" :¬).
> Must mean it's a garbage
> collection issue, since in this case there remains in memory a
> reference to the new Foo.
I'm not surprised about that at all considering the error message talks
about a reference count and Ge has mentioned using those for garbage
Great, so now we do have at least some garbage collection, even if it's not
working perfectly yet. That's at least a silver lining.
> If you add "baz @=> f;" to the end of this
> script, it crashed, which proves it.
Ok.... but I'd say that line should be valid as there *is* a rather clear
reference to "f". This is kept track of as well because appending the file
with "int f;" instead will give a (correct) complaint about "f" already
having been defined in this scope. I can understand there being some bug
left in the initialisation of apended array locations as those are new but
calling a instance "f" is not new at all. It seems like there is something
going wrong with the reference count in assignment as well or instead.
> new Foo @=> Foo @f;
> foo << f;
Lovely. I'll take this to Mike's "spaghetti with spicy bug-sauce" and see
how far that gets us.
It's kinda ironical how civilisation has gotten us to the point where we can
debate programing languages internationally over a electronic network yet we
are still forced to organise hunting parties. Nice catch you got there.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the chuck-users