On Tue, Sep 6, 2011 at 2:21 PM, graham telfer <gakousei53@hotmail.com>wrote:
Hi,
Maybe you are right about the garbage collector. This is the first thing I've tried in Smalltalk. I expected the image I saved would have the account details but no, I had to start over again and make a new account. It's not a big deal and I'll try some of the methods of storing data mentioned in other replies.
But be aware that you do not need that. Just have an object that holds references to your objects and then they are not garbage collected, and hence, saving the image is enough. For example, you can store them in a class side of a class. Say you have MyTutotial class and an calss var 'savedWhatever'. You can then store your root object there and that's all. I will be there when you load the imag again :)
Date: Mon, 5 Sep 2011 22:32:04 -0700 From: jeff@rogerthedog.com To: pharo-users@lists.gforge.inria.fr Subject: Re: [Pharo-users] Persistence of data across sessions
I don't know about that particular tutorial but if you saved the image
then
when you restart the objects will all still be in memory.
Perhaps there's a code issue. When you create an account is it referenced by anything? Maybe it's being gargbage collected when the app closes. Difficult to say for sure without seeing the code.
-- View this message in context: http://forum.world.st/Persistence-of-data-across-sessions-tp3787836p3792618.... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
-- Mariano http://marianopeck.wordpress.com