[Glass] Refrence to anObject
James Foster
james.foster at gemtalksystems.com
Thu Jun 12 09:53:22 PDT 2014
On Jun 12, 2014, at 6:37 AM, Dario Trussardi <dario.trussardi at tiscali.it> wrote:
> Ciao,
> i have a GLASS 3.1.0.4 repository where i store some data.
> Now i need do clear the repository,
How “clear” do you want the repository to be? If you want to get rid of all the data but keep the code, it might be cleaner to just load the code into a fresh repository.
> but i have some instances for which i don't " know " the pointer on it.
> I can use NameOf Class allInstances to define all relative instances.
> Now my questions are:
> A) there is way to define the object that reference a given object?
The GemStone Programming Guide (http://downloads.gemtalksystems.com/docs/GemStone64/3.1.x/GS64-ProgGuide-3.1.pdf) has a nice discussion on “Finding Instances and References” starting on page 214. If you take a look at the class Repository (the singleton is available as the global SystemRepository), and the method categories “Listing Instances” and “Listing References.”
> B) if i have an object with an istance variable ( call dictionaryA ) set to a Dictionary ( which have some asssociations )
> and i reset the the dictionaryA to: Dictionary new
> it is sufficient to have the "domino" effects relative to the hold associations?
The GemStone System Administration Guide (http://downloads.gemtalksystems.com/docs/GemStone64/3.1.x/GS64-SysAdminGuide-3.1.pdf) has a chapter on garbage collection that includes a description of what gets cleaned up in GC activity. Page 303 explains, "An object is dead if it cannot be reached from the AllUsers root object. Other dead objects may refer to it, but no live object does. Without living references, the object is visible only to the system, and is a candidate for reclaim of both its storage and its OOP. “ I also recorded a lecture on this topic. See items 19-22 at https://programminggems.wordpress.com/2010/02/05/scaling-objects-videos/.
Hope that helps,
James
> Thanks for any considerations.
>
> Dario
>
> P.S. Where i can found a valid explanation about garbage collection of the instances ?
>
> I write some code but i don't considered this problematic. Now it's time for it
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140612/99ac4449/attachment.html>
More information about the Glass
mailing list