On Monday, 13 January 2014 at 18:16:33 UTC, Dmitry Olshansky
wrote:
2. When I needed something remotely like that I'll do just fine
with array of delegates.
It's not so good to have array of delegates because you will have
a memory leaks. Delegate has permanent pointer to the object, so
GC will never free it. As alternative, you can delete delegate
manually, but in this case you can have problems with manual
memory management.
So, array of delegates is possible solution, but only for VERY
simple cases. This module solves problem with memory leaks
because it implements weak connections (based on weak reference).
It's easy to use, but VERY difficult to implement.
So, if you have any critical comments, please let us know. At
least, Robert will have a chance to fix it.