On 15 February 2012 11:26, Henrik Johansen <henrik.s.johansen@veloxit.no> wrote:
I sort of doubt Magma uses anything registering external objects but the standard Sockets⦠While interrupting finalization process _could_ be a culprit, I'd rather watch for something like what happened with the InputEventFetcher, where registration/deregistration ends up not being symmetric.
Perhaps Magma tries to reuse existing Socket instances by calls to initialize:/acceptFrom: for example?
I think changing ExternalSemaphoreTable to a weak structure would be a really bad idea btw. All of a sudden, you free up slots which were previously taken for insertion of old objects.
There is no guarantee the external user of the semaphore will stop using the index it was given just because the image no longer holds a reference to the object which used to occupy that index.
So if you register a new object in the same slot, in the case of Sockets at least, you could potentially end up responding to signals from both the old external user, and the new one.
TLDR; Any object registered in this table by definition needs explicit cleanup of external users before they are GC'd. Thus, making the table weak makes no sense.
Yes, that could happen. Well, then the only option is to check what code producing leaks. And that's not trivial, since you cannot trace references back to semaphore's original owner. :( -- Best regards, Igor Stasenko.