On Sunday, 14 April 2013 at 17:35:00 UTC, Johannes Pfau wrote:
IMHO if a object still is connected to a active signal it
should not be
collected. So the place where the signal stores the handler
should be
scanned by the GC as usual. Then just document clearly that you
have to
remove a handler to make sure that garbage collection can
really kick
in.
The caller should have the option to connect a strong reference
or a weak reference. In C#, people forgetting to disconnect event
handlers is the most common source of memory leaks. Let's not
bring that to D.