Storing ByteArray in GOODS

Avi Bryant avi.bryant at gmail.com
Thu Feb 17 14:30:56 UTC 2005


On Sun, 13 Feb 2005 19:21:15 +0800, Yar Hwee Boon <hboon at motionobj.com> wrote:
> Has anyone stored ByteArray instances into GOODS with WriteBarrier?

Hm, yes, it seems that there is a problem with
#primitiveChangeClassTo: and ByteArray.  For example, the following
doesn't even work:

|x|
x := #(1 2 3) asByteArray.
x primitiveChangeClassTo: x

Anyone know why this might be?

The quickest workaround I can think of only works if you never modify
a ByteArray instance after putting it into the DB; override
ByteArray>>goodsIsImmutable to return true.

Avi



More information about the Squeak-dev mailing list