Garrett Moon 86d2ab617e I didn't really understand NSProxy (#2089)
* I didn't really understand NSProxy

But I think I do now :)

Previously I inherited from NSObject because I didn't think I needed
anything fancy, but it turns out NSProxy is *less* fancy than NSObject
and allows for overriding more methods. This change is probably purely
academic in that we don't use this class to forward NSObject specific
messages, but I believe this is the 'right thing'.

* Update comment, thanks @maicki!
2016-08-17 17:59:28 -07:00

22 lines
564 B
Objective-C

//
// ASWeakProxy.h
// AsyncDisplayKit
//
// Created by Garrett Moon on 4/12/16.
//
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
//
#import <Foundation/Foundation.h>
@interface ASWeakProxy : NSProxy
@property (nonatomic, weak, readonly) id target;
+ (instancetype)weakProxyWithTarget:(id)target;
@end