On Monday, 27 June 2016 at 19:59:05 UTC, Mathias Lang wrote:
Delegate don't GC allocate when:
- You take a pointer to a member function
- The function accept a `scope` delegate and you pass a literal
- You use `scope myDG = (Params) { body... }`
I have a somewhat related question.
Why use a d
On Monday, 27 June 2016 at 19:59:05 UTC, Mathias Lang wrote:
- You use `scope myDG = (Params) { body... }`
It looks like i is still moved to the heap but marking `test`
with @nogc compiles successfully. Then when I run the code the
assertion is triggered. What exactly is going on here?
auto
On Monday, 27 June 2016 at 19:34:06 UTC, "Smoke" Adams wrote:
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 someth
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