NSObject+BBADealloc.h 904 Bytes
//
//  NSObject+BBADealloc.h
//  BBAPods
//
//  Created by 00 on 16/5/18.
//  Copyright © 2016年 Baidu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BDPFoundationDefines.h"

/**
 * 关联对象的 get 和 set 方法
 * 详细介绍请看README-BBARuntime
 */

@interface NSObject (BBADealloc)

/**
 * @brief 注册在当前对象释放之前所需处理的handle。(handleKey相同的handle将会覆盖之前的handle)
 *
 * @param handleKey 待处理handle所对应的key。相同key的handle将覆盖之前的handle
 * @param willDeallocHandle 当前对象释放之前的操作回调
 */
- (void)bba_registerDeallocHandleWithKey:(NSString *)handleKey handle:(void(^)(void))willDeallocHandle  BDP_FOUNDATION_DEPRECATED("please use bdp_registerDeallocHandleWithKey:");
- (void)bdp_registerDeallocHandleWithKey:(NSString *)handleKey handle:(void(^)(void))willDeallocHandle;

@end