No Description

AgoraConst.m 621B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // MyAgoraRtcEngineKit.m
  3. // RCTAgora
  4. //
  5. // Created by 邓博 on 2017/6/30.
  6. // Copyright © 2017年 Syan. All rights reserved.
  7. //
  8. #import "AgoraConst.h"
  9. @implementation AgoraConst
  10. static AgoraConst *_person;
  11. + (instancetype)allocWithZone:(struct _NSZone *)zone{
  12. static dispatch_once_t predicate;
  13. dispatch_once(&predicate, ^{
  14. _person = [super allocWithZone:zone];
  15. });
  16. return _person;
  17. }
  18. + (instancetype)share {
  19. static dispatch_once_t onceToken;
  20. dispatch_once(&onceToken, ^{
  21. _person = [[self alloc]init];
  22. });
  23. return _person;
  24. }
  25. - (id)copyWithZone:(NSZone *)zone {
  26. return _person;
  27. }
  28. @end