beginner question: storing and retrieving objects in smalltalk

Lex Spoon lex at cc.gatech.edu
Tue Sep 26 21:00:43 UTC 2000


FloriSoftware at aol.com wrote:
> I also noticed many ways of reading those characters back from the stream, 
> e.g.
> 
> aStream contentsOfEntireFile 
> 
> this gives me back the string representation and I can scan over it and 
> create a new object.
> 
> is this the way to do it - or is threre a simpler ( and more general way ) of 
> serializing and deserializing objects?
> 

ReferenceStream, and SmartRefStream, are probably the way to go.  They
handle cycles, for example.  SmartRefStream is also.... smart. 
Relatively speaking, at least.

If it's a really big object that takes a significant fraction of the
object memory, then image segments are worth looking at.


-Lex





More information about the Squeak-dev mailing list