[Cuis-dev] releaseActionMap

Juan Vuletich juan at cuis.st
Sun Jun 9 16:23:11 PDT 2024


What follows is a conjecture, becaus I can not reproduce the problem.

It is likely that that the events are forming a circular chain of 
references. Our event system is implemented using Weak collections. Weak 
collections can't automatically clean circular chains. That's why a more 
sophisticated techinque "Ephemerons" was developed.

The OpenSmalltalk VM supports Ephemerons, but Cuis is not taking 
advantage of this, and doesn't offer Ephemerons. This is something I'd 
like to add to Cuis in the mid term (this year or next year), unless 
someone beats me to do it.

In any case, I think that if in your windows, in the #close method (add 
it if not there), after calling `super close`, doing `model 
flushEventSystem` could solve the problem.

HTH,

On 6/9/2024 8:16 PM, Juan Vuletich via Cuis-dev wrote:
> Hi Hilaire,
>
> #flushEventSystem does #removeActionsForEvent:, so it is not the same 
> as doing #garbageCollect. I believe doing #garbageCollect will not help.
>
> Either you or someone else (perhaps me) needs to understand what's 
> going on. I can only do it if I can debug an image with the symptoms 
> on my PC.
>
> The alternative, as Andrés suggested, is for you to use the provided 
> tools to understand the reference chains.
>
> Hope this helps,
>
> On 6/8/2024 11:26 AM, Hilaire Fernandes via Cuis-dev wrote:
>>
>> Flushing the event system seems to help: ActiveModel flushEventSystem.
>>
>> Looks like I have to do it manually
>>
>> Or will #garbageCollect be more appropriate? But it is not node 
>> frequently enough? Or do I miss somethings?
>>
>>
>> Le 06/06/2024 à 23:42, Hilaire Fernandes a écrit :
>>>
>>> Since then, I observed that when I save the image, the things get 
>>> smoother and obsolete entries in action map seem to be collected.
>>>
>>> Could it be related?
>>>
>> -- 
>> GNU Dr. Geo
>> http://gnu.org/s/dr-geo/
>> http://gnu-drgeo.blogspot.com/
>
>
> -- 
> Juan Vuletich
> cuis.st
> github.com/jvuletich
> researchgate.net/profile/Juan-Vuletich
> independent.academia.edu/JuanVuletich
> patents.justia.com/inventor/juan-manuel-vuletich
> linkedin.com/in/juan-vuletich-75611b3
> twitter.com/JuanVuletich


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240609/0c0f0edf/attachment.htm>


More information about the Cuis-dev mailing list