NSObject+RACDeallocating.h 797 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // NSObject+RACDeallocating.h
  3. // ReactiveObjC
  4. //
  5. // Created by Kazuo Koga on 2013/03/15.
  6. // Copyright (c) 2013 GitHub, Inc. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @class RACCompoundDisposable;
  10. @class RACDisposable;
  11. @class RACSignal<__covariant ValueType>;
  12. NS_ASSUME_NONNULL_BEGIN
  13. @interface NSObject (RACDeallocating)
  14. /// The compound disposable which will be disposed of when the receiver is
  15. /// deallocated.
  16. @property (atomic, readonly, strong) RACCompoundDisposable *rac_deallocDisposable;
  17. /// Returns a signal that will complete immediately before the receiver is fully
  18. /// deallocated. If already deallocated when the signal is subscribed to,
  19. /// a `completed` event will be sent immediately.
  20. - (RACSignal *)rac_willDeallocSignal;
  21. @end
  22. NS_ASSUME_NONNULL_END