Re: ModuleLayer.Controller strongly references Module

2021-11-24 Thread Alan Bateman
On 24/11/2021 18:14, Michał Kłeczek wrote: For sure it’s fun :) Regardless of “smart proxies” the lifetime of ML.Controller should be - if not fixed - at least be documented IMHO. Right now it’s a minefield. It's also somewhat unusual so I think we'll need to think if this is the right thi

Re: ModuleLayer.Controller strongly references Module

2021-11-24 Thread Michał Kłeczek
> On 24 Nov 2021, at 13:33, Alan Bateman wrote: >> >> 1. Controller is created upon ML construction and returned from static >> ML.defineModules methods. >> 2. Created two controller liveness tests (they rely on System.gc() though - >> not sure if there are some tricks to test it reliably). >

Re: ModuleLayer.Controller strongly references Module

2021-11-24 Thread Alan Bateman
On 24/11/2021 12:19, Michał Kłeczek wrote: Hi Alan, (Disregard previous message - fat fingers) Attached is a first draft of the patch: 1. Controller is created upon ML construction and returned from static ML.defineModules methods. 2. Created two controller liveness tests (they rely on System

Re: ModuleLayer.Controller strongly references Module

2021-11-24 Thread Michał Kłeczek
Hi Alan, (Disregard previous message - fat fingers) Attached is a first draft of the patch: 1. Controller is created upon ML construction and returned from static ML.defineModules methods. 2. Created two controller liveness tests (they rely on System.gc() though - not sure if there are some t

Re: ModuleLayer.Controller strongly references Module

2021-11-24 Thread Michał Kłeczek
Hi Alan, Attached is a first draft of the patch. Controller is created upon ML construction and returned from static ML.defineModules methods. > On 22 Nov 2021, at 21:37, Alan Bateman wrote: >> > Assuming it's not exposed, and that there is no reference to the > ML.Controller for the boot lay