You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The non-block version of InputPort#writer calls #proxy_event on the port object, thus adding a reference from the port to the writer object. This avoids garbage collection of the writer, and thus creates a memory leak.
I guess that the same issue exists for the readers.
My gut feeling is that it could be fixed by making sure that #proxy_event uses WeakRef to reference the proxied objects.
The text was updated successfully, but these errors were encountered:
doudou
referenced
this issue
in planthaber/rock-webapp-old
Sep 3, 2014
The reference is used to propagate errors from the reader/writer to the port. I guess we could change the code to do the propagation from the reader/writer side
The issue is that I've seen this pattern quite a few times, that's why I was wondering about moving to a WeakRef implementation instead (it makes sure we don't get the problem ...). But it is also more changes, and only the reader/writer stuff is problematic from a ressource point of view (they maintain a connection to the port).
The non-block version of InputPort#writer calls #proxy_event on the port object, thus adding a reference from the port to the writer object. This avoids garbage collection of the writer, and thus creates a memory leak.
I guess that the same issue exists for the readers.
My gut feeling is that it could be fixed by making sure that #proxy_event uses WeakRef to reference the proxied objects.
The text was updated successfully, but these errors were encountered: