[chuck-users] Object reference weirdness

mike clemow gelfmuse at gmail.com
Wed Sep 24 15:13:07 EDT 2008


I have an array of objects that I've created and I'm abstracting
arrays of these objects as a class of its own right.  While testing my
code I've run into some weird snags.  I would get bus errors when
calling a print() function, which is supposed to just print to the
screen the values of the object's members.

I've been trying to track this down and then ran into a situation
where I am instantiating a brand new object and changing it's member
values (without adding it to the array).  Whenever I change it's
values, a certain object in my array changes with it--it's reference
is identical to the new one I just created.  This is like a warp in
spacetime somewhere.  My object is some quantum object that has a twin
and is being changed instantaneously but at a distance.  Schrodinger's
cat is rolling over in its grave.  (kidding).

What is happening here?  Is this a garbage collection issue?  I will
send my code (and instructions on running it) to anyone who wants to
take a look, but I'm afraid of subjecting the entire list to my
spaghetti...  ;-)

-mike

-- 
http://semiotech.org
http://semiotech.org/michael


More information about the chuck-users mailing list