AnonymousDisposable

Constructors

this
this(void delegate() dispose)

Members

Functions

dispose
void dispose()

Inherited Members

From Disposable

dispose
void dispose()

Examples

1 int count = 0;
2 auto d = new AnonymousDisposable({ count++; });
3 assert(count == 0);
4 d.dispose();
5 assert(count == 1);
6 d.dispose();
7 assert(count == 1);