OC 언어 day06-06 ARC 및 MRC 혼합

1257 단어

pragma mark ARC 및 MRC 혼합


pragmamark 개념

/**
         ARC   
 
     ARC             ARC  
 
         -->TARGETS Build Phases 
     ARC     Complie Sources(    )
    -fno-objc-arc 
 */

pragmamark 코드

#import 
#pragma mark  

#pragma mark main  
int main(int argc, const char * argv[])
{
    
    // -fno-objc-arc
    return 0;
}


Person.h//인간
#import 
@class Dog;
@interface Person : NSObject
@property (nonatomic, strong) Dog *dog;

@end

Person.m
#import "Person.h"

@implementation Person

@end

Dog.개류
#import 

@class Bone;

@interface Dog : NSObject

@property(nonatomic, retain)Bone *bone;


@end

Dog.m
#import "Dog.h"

@implementation Dog

- (void)dealloc
{
    [_bone release];
    [super dealloc];
}

@end

Person.뼈류
#import 

@interface Bone : NSObject

@end

Person.m
#import "Bone.h"

@implementation Bone
- (void)dealloc
{
    [super dealloc];
}
@end

좋은 웹페이지 즐겨찾기