C/C++有一年经验.
现在iphone开发有三个月了.
有什么问题一般不能独立解决.
想学习下unix,gcc,gnu.
深入了解底层方面的东西.
想可能以后对iphone开发有帮助.

解决方案 »

  1.   

    autorelease内存管理的问题:Every time -autorelease is sent to an object, it is added to the inner-most autorelease pool. When the pool is drained, it simply sends -release to all the objects in the pool.Autorelease pools are simply a convenience that allows you to defer sending -release until "later". That "later" can happen in several places, but the most common in Cocoa GUI apps is at the end of the current run loop cycle.这个run loop cycle是怎么回事?
      

  2.   

     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];//开始run loop cycle
        int retVal = UIApplicationMain(argc, argv, nil, nil);//中间可以嵌入run loop cycle
        [pool release];//结束run loop cycle
    如果用多线程,也可以另生成一些run loop,一般来说就由系统决定什么时候释放了。
      

  3.   

    肯定有帮助的啦。
    iphone平台的ios也是个unix内核,只是可能有些地方不一样罢了。
    可以这么想: unix内核 近似等于 mac内核, mac精简为iphone内核.unix编程思想很好的书,一定要看。
    另外,建议装linux, ubuntu挺好,没事多玩玩命令行,脚本,多写点C代码,就会慢慢理解了。
      

  4.   

    #include <stdio.h>
    #include <curses.h>int main()
    {
        initscr();
        clear();
        addstr("Hello ,World!");
        move(1,0);
        refresh();
        getch();
        endwin();
    }这个程序链接有错误.
    <curses.h>这个文件有个动态库libcurses.dylib.在usr/lib里边.
    但是gcc好像找不到.Undefined symbols for architecture x86_64:
      "_stdscr", referenced from:
          _main in main.o
      "_initscr", referenced from:
          _main in main.o
      "_wclear", referenced from: