Wraps dispose method in virtual functions.
int count = 0; struct TestDisposable { void dispose() { count++; } } TestDisposable test; Disposable disposable = disposableObject(test); assert(count == 0); disposable.dispose(); assert(count == 1);
See Implementation
Wraps dispose method in virtual functions.