Diff between function and delegate
Smoke Adams via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jun 27 12:34:06 PDT 2016
I have
alias fnc = void function(Object);
alias del = void delegate();
Does func avoid the GC? I am passing in this to Object so I don't
technically need a delegate or a "context". I want to be sure
that I'm actually gaining something here by doing this.
I read somewhere that delegates only require the GC when they use
objects outside their scope. Do delegates always use the GC or
only in certain cases?
More information about the Digitalmars-d-learn
mailing list