On 10/30/2009 12:09 AM, Roland Plüss wrote:
What exactly you mean with "moving"? I'm not referencing to data inside
the custom data area using pointers. Most of the time I simply store
there a pointer to the wrapped engine object. Sometimes it's two
pointers ( required if a non-ref-counted object is stored which is
located inside a ref-counted object so I store two pointers one with
ref-counting to guard the second non-ref-counted one ). So as long as
the data is just copied nothing bad should happen.
Yeah, that's fine.
Most likely you'd have a cCall for #initialize
anyway. Having one for #new instead does not change much.
To my understanding ( from past smalltalk lectures at university where
we worked with Squeak ) #new is responsible for allocating an object
while #initialize or #init is responsible for setting up default values
for the newly created instance. Therefore I proposed #new. Unless that
is in GST this rule is slightly different.
Yes, my reasoning is: if you used CObject, you would have needed anyway
a cCall to initialize the CObject. By not using CObject, you just need
your cCall to determine the correct size of the object so you use #new.
But it's not like one of the two is particularly more hackish.
Paolo
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk