|
|
|
|
|
by pcwalton
3096 days ago
|
|
> If it was scope based there's nothing you could do to get func_defer behavior. That's clearly false. You could set up a list to hold objects to be disposed (or, more generally, closures to execute) and defer a simple procedure that disposes of all objects in the list. This is in fact what the implementation of defer must do internally. |
|