[Glass] Refrence to anObject
Dario Trussardi
dario.trussardi at tiscali.it
Fri Jun 13 09:46:01 PDT 2014
Ciao James,
> 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.
I intend to remove obsolete objects, hold client documents and relative reference.
>
>> 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,
With topaz i submit A) SystemRepository markForCollection and it answer: found 1058959 live object 518925 dead objetcs.
After i submit B) SystemRepository reclaimAll and it seems work fine.
But after if i resubmit the A) it answer the same data.
I need do other commands?
For testing i control the instances of one class before A) and after B): MARecordSessioneModel allInstances size.
It's answer the same 39 items.
If i do: SystemRepository findReferencePathToObject: anMARecordSessionModel it answer an Array with 2 element where second is set to false.
The result of this method is an array, with the first two elements consisting of the search object and true or false indicating if a reference path was found.
No reference path means that the object would be garbage collected by the next MFC
Questions A) Because the MFC and reclaimAll don't remove these instances?
Questions B) Into a production system the MFC required external command or the system can manage it automatically ?
Questions C) The System startAllReclaimGcSessions if i right understand work in foreground,
but how many CPU load required?
it not required the SystemRepository markForCollection operation?
Thanks in advanced,
Dario
>
> 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/20140613/b7bb1fe6/attachment-0001.html>
More information about the Glass
mailing list