On Thu, Jan 15, 2015 at 6:06 AM, sergio_101 <sergio....@gmail.com> wrote:
> I am building a seaside application, and am in the process of building my > models and unit tests. > > I have a few objects that build up my data by creating objects. > > when i run the data creation methods, everything is fine. immediately > afterward, since these objects to belong to anything, they are cleaned up > by garbage collection. > > > is there a way to create these objects so that they persist? > They should belong to your session if you want them to live for the session. Otherwise, I guess you can put them in a global var to make it available everywhere, or in GRObject>>application, session, or requestContext depending on how long you want them to live. > if this is possible, how would you go about deleting such a tenacious > object? > Session expiry for session vars. The other ones, standard Smalltalk way, replacing the reference with something else innocuous if you can't get rid of them the normal gc way. Like, x become: String new. (and not x become: nil, which would make nil become x...) > > thanks! >