Re: Delegates with stackpointers

2018-09-29 Thread bauss via Digitalmars-d-learn
On Saturday, 29 September 2018 at 06:01:50 UTC, Ritchie wrote: How does a delegate with a stackpointer work? e.g. in this example: https://run.dlang.io/is/XviMSl Does the second call to foo not overwrite the stack of the first call and thereby the data pointed to by bar1? How is that data pr

Re: Delegates with stackpointers

2018-09-29 Thread Alex via Digitalmars-d-learn
On Saturday, 29 September 2018 at 06:01:50 UTC, Ritchie wrote: How does a delegate with a stackpointer work? e.g. in this example: https://run.dlang.io/is/XviMSl Does the second call to foo not overwrite the stack of the first call and thereby the data pointed to by bar1? How is that data pr

Delegates with stackpointers

2018-09-28 Thread Ritchie via Digitalmars-d-learn
How does a delegate with a stackpointer work? e.g. in this example: https://run.dlang.io/is/XviMSl Does the second call to foo not overwrite the stack of the first call and thereby the data pointed to by bar1? How is that data preserved?