蓝鸥iOS从零基础到精通就业-OC语言入门 对象内存管理2

  • iOS从零基础到精通就业 Objective-C

  • CSDN观看地址:http://edu.csdn.net/course/detail/3347
  • 对象内存管理
  •  Person.h
  • //
    //  Person.h
    //  内存管理1
    //
    //  Created by 蓝鸥 on 16/8/3.
    //  Copyright © 2016年 luanbin. All rights reserved.
    //
    
    #import 
    
    @interface Person : NSObject
    
    @end
    
     Person.m
  • //
    //  Person.m
    //  内存管理1
    //
    //  Created by 蓝鸥 on 16/8/3.
    //  Copyright © 2016年 luanbin. All rights reserved.
    //
    
    #import "Person.h"
    
    @implementation Person
    
    //当对象要死亡时会调用这个方法
    -(void)dealloc
    {
        
        NSLog(@"狗带");
        [super dealloc];
    }
    
    @end





你可能感兴趣的:(iOS学习笔记)