Re: Extending the lifetime of scope objects

2010-07-20 Thread torhu
On 20.07.2010 21:54, Ali Çehreli wrote: What are all the cases that extend the lifetime of scoped objects? Binding a delegate to a scope object extends the lifetime of that object, which would normally end upon exiting that scope. The lifetime of i is extended here: int delegate(int) make_deleg

Extending the lifetime of scope objects

2010-07-20 Thread Ali Çehreli
What are all the cases that extend the lifetime of scoped objects? Binding a delegate to a scope object extends the lifetime of that object, which would normally end upon exiting that scope. The lifetime of i is extended here: int delegate(int) make_delegate() { int i;// lives as long