[Glass] orphaned classes do not disappear
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Fri Mar 10 07:25:04 PST 2017
Are the orphaned classes still in the class history of current class
version?
Have you tried calling
Repository>>findReferencePathToObjs:limitObjArray:findAllRefs:printToLog:
with an empty limitObjArray? I think that the default listReferences
code uses something similar to Repository>>buildLimitSetForRefPathScan
as it's list of repository roots, which are ignored for purposes of list
references, but probably still useful when hunting down stale metaclass
refs.
Dale
On 3/8/17 4:01 AM, Johan Brichau via Glass wrote:
> Hi there,
>
> I am working on preparing a GS 2.4.4.1 extent for upgrade to GS 3.2
> For that, I am cleaning the repo such that no orphaned class instances still exist.
>
> I hit an issue because I find orphaned classes that are not GC’ed for which no instances still exist.
> When I ask the reference path to the class object, it tells me it is being referenced by its metaclass.
> However, when I ask for the reference path to the metaclass object, I get a ‘false’ response.
>
> Is there anything I can do to make sure these instances (of MetaClass) are removed (or otherwise find out why they are not GC’ed) ?
>
> thanks
> Johan
>
> For reference, this is the script to find orphaned classes:
> | classes orphans |
> classes := IdentitySet new.
> System myUserProfile symbolList do: [:symbolDictionary |
> symbolDictionary valuesDo: [:global |
> global isBehavior ifTrue: [ classes add: global ]]].
> System commitTransaction.
> orphans := (Metaclass allInstances collect: [:mClass | mClass theNonMetaClass ])
> select: [:class | (classes includes: class) not ].
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
More information about the Glass
mailing list