RACScopedDisposable.h 533 B

1234567891011121314151617181920212223
  1. //
  2. // RACScopedDisposable.h
  3. // ReactiveObjC
  4. //
  5. // Created by Josh Abernathy on 3/28/12.
  6. // Copyright (c) 2012 GitHub, Inc. All rights reserved.
  7. //
  8. #import "RACDisposable.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. /// A disposable that calls its own -dispose when it is dealloc'd.
  11. @interface RACScopedDisposable : RACDisposable
  12. /// Creates a new scoped disposable that will also dispose of the given
  13. /// disposable when it is dealloc'd.
  14. + (instancetype)scopedDisposableWithDisposable:(RACDisposable *)disposable;
  15. @end
  16. NS_ASSUME_NONNULL_END