ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲综合av一区二区三区,91久久精品国产91久久,国产一区二区三区黄视频http://www.aygfsteel.com/fastzch/I Love Programming As My Life!zh-cnSat, 24 May 2025 14:42:30 GMTSat, 24 May 2025 14:42:30 GMT60Hybrid开发资源网站汇æ€?/title><link>http://www.aygfsteel.com/fastzch/archive/2014/08/05/416566.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Tue, 05 Aug 2014 01:45:00 GMT</pubDate><guid>http://www.aygfsteel.com/fastzch/archive/2014/08/05/416566.html</guid><wfw:comment>http://www.aygfsteel.com/fastzch/comments/416566.html</wfw:comment><comments>http://www.aygfsteel.com/fastzch/archive/2014/08/05/416566.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fastzch/comments/commentRss/416566.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fastzch/services/trackbacks/416566.html</trackback:ping><description><![CDATA[@import url(http://www.aygfsteel.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); http://cubiq.org/ <div class="wmqeeuq" id="xunlei_com_thunder_helper_plugin_d462f475-c18e-46be-bd10-327458d045bd"></div> <div>包含iscroll, infinity wall½{?/div> <div><br /> </div> <div><br /> </div><img src ="http://www.aygfsteel.com/fastzch/aggbug/416566.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fastzch/" target="_blank">Robin's Programming World</a> 2014-08-05 09:45 <a href="http://www.aygfsteel.com/fastzch/archive/2014/08/05/416566.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ä»?USB 讑֤‡å¯åЍ Surfacehttp://www.aygfsteel.com/fastzch/archive/2014/04/01/411761.htmlRobin's Programming WorldRobin's Programming WorldMon, 31 Mar 2014 16:15:00 GMThttp://www.aygfsteel.com/fastzch/archive/2014/04/01/411761.htmlhttp://www.aygfsteel.com/fastzch/comments/411761.htmlhttp://www.aygfsteel.com/fastzch/archive/2014/04/01/411761.html#Feedback0http://www.aygfsteel.com/fastzch/comments/commentRss/411761.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/411761.html
å½?Surface 关闭时从可启åŠ?USB 讑֤‡å¯åЍ
步骤 1åQ?    ž®†å¯å¯åЍ USB 讑֤‡˜qžæŽ¥åˆ?USB 端口ã€?br />步骤 2åQ?    按住音量减小 (-) 控制键ã€?br />步骤 3åQ?    按下òq‰™‡Šæ”„¡”µæºæŒ‰é’®ã€?br />步骤 4åQ?    当显½C?Surface 徽标æ—Óž¼Œé‡Šæ”¾éŸ³é‡æŽ§åˆ¶é”®ã€?Surface ž®†å¯åŠ?USB 讑֤‡ä¸Šçš„软äšgã€?br />
å½?Surface 启用时从可启åŠ?USB 讑֤‡å¯åЍ
步骤 1åQ?    ž®†å¯å¯åЍ USB 讑֤‡˜qžæŽ¥åˆ?USB 端口ã€?br />步骤 2åQ?    从屏òq•右边缘向左è½ÀL‰«åQŒç„¶åŽç‚¹å‡?#8220;讄¡½®”ã€?br />åQˆå¦‚果您使用鼠标åQŒè¯·æŒ‡å‘屏幕的右上角åQŒå°†é¼ æ ‡æŒ‡é’ˆä¸‹ç§»òq¶å•å‡?#8220;讄¡½®”。)
步骤 3åQ?    点击或单å‡?#8220;更改电脑讄¡½®”ã€?br />步骤 4åQ?    点击或单å‡?#8220;更新和恢å¤?#8221;åQŒç„¶åŽç‚¹å‡ÀLˆ–单击“恢复”ã€?br />步骤 5åQ?    åœ?#8220;高çñ”启动”下,点击或单å‡?#8220;立即重新启动”ã€?br />步骤 6åQ?    åœ?#8220;选择一个选项”屏幕中,点击或单å‡?#8220;使用讑֤‡”ã€?br />步骤 7åQ?    åœ?#8220;疑难解答”屏幕中,点击或单å‡?#8220;高çñ”选项”ã€?br />步骤 8åQ?    åœ?#8220;高çñ”选项”屏幕中,点击或单å‡?USB 讑֤‡çš„名¿U°ã€‚Surface ž®†é‡æ–°å¯åŠ¨åÆˆä»?USB 讑֤‡å¯åЍã€?br />
BTW, ˜q˜æ˜¯å®˜æ–¹æ–‡æ¡£é è°±åQŒè¿˜æ˜¯Google靠谱åQï¼åQ?br />原文地址åQšhttp://www.microsoft.com/surface/zh-cn/support/storage-files-and-folders/boot-surface-pro-from-usb-recovery-device


Robin's Programming World 2014-04-01 00:15 发表评论
]]>
XCode Plugins Package Managerhttp://www.aygfsteel.com/fastzch/archive/2014/02/05/409533.htmlRobin's Programming WorldRobin's Programming WorldTue, 04 Feb 2014 18:28:00 GMThttp://www.aygfsteel.com/fastzch/archive/2014/02/05/409533.htmlhttp://www.aygfsteel.com/fastzch/comments/409533.htmlhttp://www.aygfsteel.com/fastzch/archive/2014/02/05/409533.html#Feedback1http://www.aygfsteel.com/fastzch/comments/commentRss/409533.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/409533.htmlXCode Plugins Package Manager
https://github.com/mneorr/Alcatraz

通过˜q™ä¸ªå·¥å…·åQŒæˆ‘˜q˜è£…了以下插ä»Óž¼š
AJKExtendedOpening
BBUDebuggerTuckAway
BBUncrustifyPlugin
CocoaPods
CodePilot
DLAutoresizeMaskPlugin
DerivedData Exterminator
FuzzyAutocomplete
HOStringSense
KSImageNamed
OMColorSense
OMQuickHelp
PluginConsole
QuickLocalization
SCXcodeMinimap
VVDocumenter-Xcode
XCFixin_CurrentLineHighlighter
XcodeAutoCloseDebug
XcodePlus Delete Line

˜q™äº›æ’äšg都是相当的好用呀åQï¼åQ?br />

Robin's Programming World 2014-02-05 02:28 发表评论
]]>
Ubuntu环境下Apache2与Tomcat集成http://www.aygfsteel.com/fastzch/archive/2014/02/05/409532.htmlRobin's Programming WorldRobin's Programming WorldTue, 04 Feb 2014 18:21:00 GMThttp://www.aygfsteel.com/fastzch/archive/2014/02/05/409532.htmlhttp://www.aygfsteel.com/fastzch/comments/409532.htmlhttp://www.aygfsteel.com/fastzch/archive/2014/02/05/409532.html#Feedback4http://www.aygfsteel.com/fastzch/comments/commentRss/409532.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/409532.html    apt-get install apache2

重启命ä×oåQ?/etc/init.d/apache2 restart

/etc/apache2/conf.d/charset
˜q™ä¸ªæ˜¯ç½‘站编码配¾|®ï¼Œéœ€è¦å°†æœ€åŽè¡Œçš?åQƒAddDefaultCharset UTF-8 前面çš?åŽÀLމåQŒä‹É用UTF-8¾~–码åQŒå½“然也可以æŠ?UTF-8æ”ÒŽˆåˆ«çš„¾~–码ã€?br />
˜q™ä¸ªæ˜¯ç½‘站目录配¾|®ï¼ŒæƒÏx›´æ”¹ç½‘站目录的话,ž®×ƒ¿®æ”¹è¿™ä¸ªï¼Œä¸Šé¢çš„目录的 apache2.conf 里面也有¾|‘站目录çš?br />/etc/apache2/sites-available/default


2�install JK connector.
apt-get install libapache2-mod-jk
soæ–‡äšg会被安装到目录: /usr/lib/apache2/modules 中ã€?br />安装完后åQŒåœ¨/etc/apache2/mods-enabled下会多出一个jk.loadæ–‡äšgåQŒé‡å¯apache2后,apache自动装蝲˜q™ä¸ªæ–‡äšg以加载mod_jk.


3、修改httpd.conf,一开始它是空�增加
#Server Name
ServerName 127.0.0.1

#JK config
#JkWorkersFile /etc/libapache2-mod-jk/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel info
JkMount /*.jsp ajp13_worker
JkMount /*/servlet/ ajp13_worker
JkMount /*.do ajp13_worker

4ã€?etc/apache2/sites-available中增加一个文ä»Óž¼Œæ–‡äšg名随ä¾?
如我的tomcat,内容如下:
<VirtualHost 127.0.0.1>
  ServerAdmin fastzch@gmail.com
  DocumentRoot "/var/www"
  ErrorLog "/var/log/apache2/ediskmanage_errors.log"
  CustomLog "/var/log/apache2/ediskmanage_accesses.log" common

  JkMount /servlet/* ajp13_worker
  #让Apache支持对servlet传送,用以Tomcat解析
  JkMount /*.jsp ajp13_worker
  #让Apache支持对jsp传送,用以Tomcat解析
  JkMount /*.do ajp13_worker
  #让Apache支持å¯?do传送,用以Tomcat解析
</VirtualHost>

5、执�a2ensite tomcat

6�etc/init.d/apache2 reload

7、部¾|²åº”用后重启Tomcat卛_¯

Robin's Programming World 2014-02-05 02:21 发表评论
]]>
Phonegap Debug Notehttp://www.aygfsteel.com/fastzch/archive/2014/01/02/408382.htmlRobin's Programming WorldRobin's Programming WorldThu, 02 Jan 2014 06:17:00 GMThttp://www.aygfsteel.com/fastzch/archive/2014/01/02/408382.htmlhttp://www.aygfsteel.com/fastzch/comments/408382.htmlhttp://www.aygfsteel.com/fastzch/archive/2014/01/02/408382.html#Feedback0http://www.aygfsteel.com/fastzch/comments/commentRss/408382.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/408382.html
The following are notes for debug feature:
The "console" is a plugin now, so we need to add it by following command:
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git

And then you could use console API now, e.g.:
console.log('onSuccess! contacts.length:' + contacts.length );

You will see logs on output console of Xcode or Logcat of Eclipse.
Pls see following screenshots:







Robin's Programming World 2014-01-02 14:17 发表评论
]]>
iOS App -- WHETC 发布http://www.aygfsteel.com/fastzch/archive/2012/11/10/391148.htmlRobin's Programming WorldRobin's Programming WorldSat, 10 Nov 2012 12:06:00 GMThttp://www.aygfsteel.com/fastzch/archive/2012/11/10/391148.htmlhttp://www.aygfsteel.com/fastzch/comments/391148.htmlhttp://www.aygfsteel.com/fastzch/archive/2012/11/10/391148.html#Feedback0http://www.aygfsteel.com/fastzch/comments/commentRss/391148.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/391148.htmlä¸»è¦æ˜¯äØ“æ­¦æ±‰è½¦ä¸»æä¾›ETC查询的功能ã€?/div>

有需要的朋友åQŒå¯ç›´æŽ¥åœ?App Store上搜WHETCåQŒç„¶åŽä¸‹è½½ã€?/div>
也可通过下蝲链接直接下蝲åQšhttps://itunes.apple.com/cn/app/whetc/id558349225

有什么好的徏议或问题è¯ïL•™­a€ã€‚谢谢!



]]>How to uninstall dnscrypt client on MAChttp://www.aygfsteel.com/fastzch/archive/2012/09/16/387829.htmlRobin's Programming WorldRobin's Programming WorldSun, 16 Sep 2012 10:14:00 GMThttp://www.aygfsteel.com/fastzch/archive/2012/09/16/387829.htmlhttp://www.aygfsteel.com/fastzch/comments/387829.htmlhttp://www.aygfsteel.com/fastzch/archive/2012/09/16/387829.html#Feedback0http://www.aygfsteel.com/fastzch/comments/commentRss/387829.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/387829.htmlhttp://shared.opendns.com/dnscrypt/packages/osx-client/
下蝲  Uninstall.app.zip


Robin's Programming World 2012-09-16 18:14 发表评论
]]>
首个iOS App¾lˆäºŽæäº¤äº?/title><link>http://www.aygfsteel.com/fastzch/archive/2012/09/03/386856.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Mon, 03 Sep 2012 03:45:00 GMT</pubDate><guid>http://www.aygfsteel.com/fastzch/archive/2012/09/03/386856.html</guid><wfw:comment>http://www.aygfsteel.com/fastzch/comments/386856.html</wfw:comment><comments>http://www.aygfsteel.com/fastzch/archive/2012/09/03/386856.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fastzch/comments/commentRss/386856.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fastzch/services/trackbacks/386856.html</trackback:ping><description><![CDATA[@import url(http://www.aygfsteel.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); ¾lè¿‡ä¸¤ä¸ªæœˆå·¦å³çš„æ—‰™—´½{–划和开发,我个人的首个iOS App¾lˆäºŽæäº¤äº†ï¼Œå…ˆå†’个æˆöåQŒç­‰Review通过后会再开一个专贴进行介¾lå’ŒæŠ€æœ¯æ”¯æŒã€? <div>至于是个什么应用,我想可能˜q˜å¾—先保密一两周什么的åQŒè¿™å¾—看Apple的速度了,哈哈...</div> <div><br /> </div> <div>有兴­‘£çš„可以猜猜看ã€?/div><img src ="http://www.aygfsteel.com/fastzch/aggbug/386856.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fastzch/" target="_blank">Robin's Programming World</a> 2012-09-03 11:45 <a href="http://www.aygfsteel.com/fastzch/archive/2012/09/03/386856.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>XP IIS出现The specified module could not be found解决æ–ÒŽ³•http://www.aygfsteel.com/fastzch/archive/2012/07/03/382092.htmlRobin's Programming WorldRobin's Programming WorldTue, 03 Jul 2012 07:09:00 GMThttp://www.aygfsteel.com/fastzch/archive/2012/07/03/382092.htmlhttp://www.aygfsteel.com/fastzch/comments/382092.htmlhttp://www.aygfsteel.com/fastzch/archive/2012/07/03/382092.html#Feedback0http://www.aygfsteel.com/fastzch/comments/commentRss/382092.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/382092.html

Robin's Programming World 2012-07-03 15:09 发表评论
]]>
Open Mac Ftp Serverhttp://www.aygfsteel.com/fastzch/archive/2012/06/30/381890.htmlRobin's Programming WorldRobin's Programming WorldSat, 30 Jun 2012 15:15:00 GMThttp://www.aygfsteel.com/fastzch/archive/2012/06/30/381890.htmlhttp://www.aygfsteel.com/fastzch/comments/381890.htmlhttp://www.aygfsteel.com/fastzch/archive/2012/06/30/381890.html#Feedback0http://www.aygfsteel.com/fastzch/comments/commentRss/381890.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/381890.htmlWhile this hint will work as stated, it's pretty much incorrect usage of launchctl for the purpose of the hint.

launchctl load...loads the FTP service into launchd's database of services. When you do an unload, you are telling launchd to not manage it anymore.

So a better way to do this--probably the proper way--is to first issue the command to load the service:

sudo launchctl load -w /System/Library/LaunchDaemons/ftp.plist

Then, if you'd like to stop FTP, issue this command:

sudo launchctl stop com.apple.ftpd

And if you decide you'd like to bring it back up, use this command:

sudo launchctl start com.apple.ftpd

If you'd like for launchd to forget about FTP, that is when you would run this:

sudo launchctl unload /System/Library/LaunchDaemons/ftp.plist

The hint as-is will work, but seems a little counter-productive to make launchd remember and forget about FTP all the time.



Robin's Programming World 2012-06-30 23:15 发表评论
]]>
Spring 3 MVC and JSON examplehttp://www.aygfsteel.com/fastzch/archive/2012/06/04/379962.htmlRobin's Programming WorldRobin's Programming WorldMon, 04 Jun 2012 15:06:00 GMThttp://www.aygfsteel.com/fastzch/archive/2012/06/04/379962.htmlhttp://www.aygfsteel.com/fastzch/comments/379962.htmlhttp://www.aygfsteel.com/fastzch/archive/2012/06/04/379962.html#Feedback1http://www.aygfsteel.com/fastzch/comments/commentRss/379962.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/379962.html原文地址åQšhttp://www.mkyong.com/spring-mvc/spring-3-mvc-and-json-example/


Published: July 28, 2011 , Updated: July 27, 2011 , Author: mkyong

 

In Spring 3, you can enable “mvc:annotation-driven” to support object conversion to/from JSON format, if Jackson JSON processor is existed on the project classpath.

In this tutorial, we show you how to output JSON data from Spring MVC.

Technologies used :

Spring 3.0.5.RELEASE
Jackson 1.7.1
JDK 1.6
Eclipse 3.6
Maven 3
1. Project Dependencies

To use JSON in Spring MVC, you need to include Jackson dependency.

    <properties>
        <spring.version>3.0.5.RELEASE</spring.version>
    </properties>
 
    <dependencies>
 
        <!-- Jackson JSON Mapper -->
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.7.1</version>
        </dependency>
 
        <!-- Spring 3 dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring.version}</version>
        </dependency>
 
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>
 
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
 
    </dependencies>

 
2. Model

A simple POJO, later convert this object into JSON output.

package com.mkyong.common.model;
 
public class Shop {
 
    String name;
    String staffName[];
 
    //getter and setter methods
 
}

 
3. Controller

Add “@ResponseBody” in the return value, no much detail in the Spring documentation.

As i know, when Spring see

Jackson library existed on classpath
“mvc:annotation-driven” is enabled
Return method annotated with @ResponseBody
It will handle the JSON conversion automatically.

package com.mkyong.common.controller;
 
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.mkyong.common.model.Shop;
 
@Controller
@RequestMapping("/kfc/brands")
public class JSONController {
 
    @RequestMapping(value="{name}", method = RequestMethod.GET)
    public @ResponseBody Shop getShopInJSON(@PathVariable String name) {
 
        Shop shop = new Shop();
        shop.setName(name);
        shop.setStaffName(new String[]{"mkyong1", "mkyong2"});
 
        return shop;
 
    }
 
}
4. mvc:annotation-driven

Enable “mvc:annotation-driven” in your Spring configuration XML file.

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans    
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
 
    <context:component-scan base-package="com.mkyong.common.controller" />
 
    <mvc:annotation-driven />
 
</beans>
5. Demo

URL : http://localhost:8080/SpringMVC/rest/kfc/brands/kfc-kampar


Download Source Code

Download it – SpringMVC-JSON-Example.zip (7 KB)
References

mvc-annotation-driven documentation
High-performance JSON processor
Spring MVC and XML example


Robin's Programming World 2012-06-04 23:06 发表评论
]]>
MongoDB install notes on Mac:http://www.aygfsteel.com/fastzch/archive/2012/06/03/379837.htmlRobin's Programming WorldRobin's Programming WorldSat, 02 Jun 2012 17:15:00 GMThttp://www.aygfsteel.com/fastzch/archive/2012/06/03/379837.htmlhttp://www.aygfsteel.com/fastzch/comments/379837.htmlhttp://www.aygfsteel.com/fastzch/archive/2012/06/03/379837.html#Feedback0http://www.aygfsteel.com/fastzch/comments/commentRss/379837.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/379837.htmlReference page: Http://docs.mongodb.org/master/tutorial/install-mongodb-on-os-x/

1, install brew, if it is exist, skip this step.
Reference page:  http://mxcl.github.com/homebrew/
Execute the following command:
#/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

2, install MongoDB:
#brew update
#brew install mongodb

3, use mondod command to startup MongoDB
#nohup mongod &

4, enter mongo shell for testing:
#mongo

MongoDB shell version: 2.0.5
connecting to: test
> db.test.save({a:1})
> db.test.find()
{ "_id" : ObjectId("4fca4824293f5115fa740813"), "a" : 1 }

5, GUI client recommendations:

MongoExplorer
MongoHub

6, MongoDB has provided a web base management inerface:
http://localhost:28017/

7, export and import:
$ mongodump -h test.xxxx.com:52000 -d dataname -o /home/aa/dev/mongodb/data

mongodump mongo导出数据库命�mongodump --help 可以查看该命令下所有的帮助

-h 导出æº?br /> -d 要导出的数据库名¿U?br /> -o 数据库要导出的位¾|?br />
在终端滚˜q‡N行之后,数据库导出完成,可以åŽ?home/aa/dev/mongodb/data 目录下查看导出的文äšgåQŒbson格式的(我导出后没有马上ž®Þqœ‹åˆ°æ–‡ä»Óž¼Œ½{‰äº†ä¸€ä¼šæ‰å‡ºçŽ°çš„ï¼ŒåŽŸå› ä¸æ˜ŽåQ?br />
然后数据库恢复ä‹É用:mongorestore 命ä×o

$ mongorestore -d cmsdev  /home/xx/dev/mongodb/data/cmsdev

-d 使用的数据库名称
后面直接加你刚才导出的目录,˜q™æ ·æ˜¯ç›´æŽ¥æ¢å¤æ‰€æœ‰è¡¨

如果-c 是恢复一个表


Robin's Programming World 2012-06-03 01:15 发表评论
]]>
æ°æ€¹…恢复联é€?iPhone4 çš?YouTubehttp://www.aygfsteel.com/fastzch/archive/2012/01/17/368638.htmlRobin's Programming WorldRobin's Programming WorldTue, 17 Jan 2012 02:43:00 GMThttp://www.aygfsteel.com/fastzch/archive/2012/01/17/368638.htmlhttp://www.aygfsteel.com/fastzch/comments/368638.htmlhttp://www.aygfsteel.com/fastzch/archive/2012/01/17/368638.html#Feedback2http://www.aygfsteel.com/fastzch/comments/commentRss/368638.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/368638.html

原文地址åQ?/span> http://www.inanu.net/post/314.html
iOS 5.0.1 亲测


æ°æ€¹…恢复联é€?iPhone4 çš?YouTube

作è€? Nanu æ—¥æœŸ: 2011-05-18

在有 G.F.W. “保护”下的天朝¾|‘络åQŒè”通竟然还阉割掉了 iPhone4 çš?Youtube 应用åQŒçœŸæ˜¯æ–­å­ç»å­™å•ŠåQä¸ç”˜å¿ƒåQŒä¸€å®šè¦æŠ?Youtube 扑֛žæ¥ï¼

在网上看了很关于恢复联é€?iPhone4 YouTube 的方法,æ€È»“下大致就 2 ¿Uæ–¹æ³•:
1. 利用SBSettings恢复åQ›ï¼ˆæˆ‘测试是没有效果的)
2. åœ?Safari 上访é—?m.youtube.com 之后挂个ä¸Õd±òq•的标签åQ›ï¼ˆå›¾æ ‡å¤ªæ¶å¿ƒï¼‰

下面¾lˆæžæ¢å¤æ–ÒŽ³•来了åQ?/p>

  • 该方法只适用于联é€?iPhone4åQ?/strong>
  • iPhone4 必须已经­‘Šç‹±åQŒå¦‚果不惌™¶Šç‹Þqš„åQŒè¯·ä½¿ç”¨ä¸Šé¢çš„æ–¹æ³?2åQ?/strong>
  • 该方法适用于所有的 iOS å›ÞZšg版本åQ?/strong>

1. ž®?iPhone4 ˜qžæŽ¥è‡?i-FunboxåQŒåƈ˜q›å…¥åˆ?//Applications/YouTube.app 目录åQ?/p>

2. ž®†ç›®å½•中çš?Info.plist æ–‡äšg复制åˆîC½ çš„电脑上åQˆåšä¸ªå¤‡ä»½ï¼Œä»¥é˜²ä¸‡ä¸€åQ‰ï¼›

3. ž®†ä¸‹é¢çš„代码复制¾_˜è„“åˆîC¸€ä¸ªæ–‡ä»¶ä¸­åQŒåƈ命名ä¸?Info.pliståQ?/p>

4. ž®†æ–°å»ºçš„ Info.plist 复制åˆ?iPhone4 中的 YouTube.app 目录åQŒè¦†ç›–原文äšgåQ?/p>

5. 重启 iPhone4åQ?/p>

HOHO! 熟悉�YouTube 图标回来啦!


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0" converted_by="i-funbox.com">
<dict> 
    <key>DTXcode</key>
        <string>0324</string>
        <key>DTSDKName</key>
        <string>iphoneos4.1.internal</string>
        <key>CFBundleName</key>
    <string>YouTube</string>
    <key>UIApplicationExitsOnSuspend</key>
        <true />
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>DTPlatformName</key>
    <string>iphoneos</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSupportedPlatforms</key>
    <array>
        <string>iPhoneOS</string>
    </array>
    <key>SBUsesNetwork</key>
    <integer>3</integer>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleExecutable</key>
    <string>YouTube</string>
    <key>DTCompiler</key>
    <string>4.2</string>
    <key>SBMatchingApplicationGenres</key>
    <array>
        <string>Entertainment</string>
        <string>Social Networking</string>
    </array>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLName</key>
            <string>YouTube Internal URL</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>youtube</string>
            </array>
        </dict>
 
    </array>
    <key>CFBundleIdentifier</key>
    <string>com.apple.youtube</string>
    <key>CFBundleResourceSpecification</key>
    <string>ResourceRules.plist</string>
    <key>DTPlatformVersion</key>
    <string>4.1 GM</string>
        <key>CFBundleIconFiles</key>
        <array>
               <string>icon-72.png</string>
               <string>icon.png</string>
               <string>icon@2x.png</string>
        </array>
        <key>CFBundleDisplayName</key>
        <string>YouTube</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleDisplayName</key>
    <string>YouTube</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>MinimumOSVersion</key>
    <string>4.1</string>
    <key>UIDeviceFamily</key>
    <array>
        <integer>1</integer>
        <integer>2</integer>
    </array>
</dict>
</plist>



]]>
[转]查找 EXC_BAD_ACCESS 问题æ ÒŽºçš„æ–¹æ³?/title><link>http://www.aygfsteel.com/fastzch/archive/2012/01/05/367925.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Thu, 05 Jan 2012 08:18:00 GMT</pubDate><guid>http://www.aygfsteel.com/fastzch/archive/2012/01/05/367925.html</guid><wfw:comment>http://www.aygfsteel.com/fastzch/comments/367925.html</wfw:comment><comments>http://www.aygfsteel.com/fastzch/archive/2012/01/05/367925.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fastzch/comments/commentRss/367925.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fastzch/services/trackbacks/367925.html</trackback:ping><description><![CDATA[<div>原文地址åQ?http://www.cocoachina.com/macdev/objc/2011/0219/2661.html<br /><br /><div style="margin-top: 19px; margin-right: 10px; margin-bottom: 20px; margin-left: 10px; height: 58px; width: 609px; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #ebf1ed; border-right-color: #ebf1ed; border-bottom-color: #ebf1ed; border-left-color: #ebf1ed; border-image: initial; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, å¾®èÊY雅黑, 黑体, 宋体; font-size: 12px; line-height: normal; "><p style="margin-top: 4px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 50px; width: 601px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f3f4f4; "><span style="display: block; height: 31px; width: 578px; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 8px; line-height: 1.4; overflow-x: hidden; overflow-y: hidden; ">写程序遇åˆ?Bug òq¶ä¸å¯æ€•,大部分的问题åQŒé€šè¿‡½Ž€å•çš„ Log 或è€?代码分析òq¶ä¸é𾿉¾åˆ°åŽŸå› æ‰€åœ¨ã€‚ä½†æ˜¯åœ¨ Objective-C ¾~–程中遇åˆ?EXC_BAD_ACCESS 问题的时候,通过½Ž€å•常规的手段很难发现问题ã€?/span></p></div><div class="wmqeeuq" id="article_text_font" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; height: auto; width: 643px; line-height: 1.8; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, å¾®èÊY雅黑, 黑体, 宋体; "><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    写程序遇åˆ?Bug òq¶ä¸å¯æ€•,大部分的问题åQŒé€šè¿‡½Ž€å•çš„ Log 或è€?代码分析òq¶ä¸é𾿉¾åˆ°åŽŸå› æ‰€åœ¨ã€‚ä½†æ˜¯åœ¨ Objective-C ¾~–程中遇åˆ?EXC_BAD_ACCESS 问题的时候,通过½Ž€å•常规的手段很难发现问题。这½‹‡æ–‡ç« ï¼Œ¾l™å¤§å®¶ä»‹¾lä¸€ä¸ªå¸¸ç”¨çš„æŸ¥æ‰¾ EXC_BAD_ACCESS 问题æ ÒŽºçš„æ–¹æ³•ã€?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    首先说一ä¸?EXC_BAD_ACCESS ˜q™ä¸ªé”™è¯¯åQŒå¯ä»¥è¿™ä¹ˆè¯´åQ?0%的错误来源在于对一个已¾lé‡Šæ”„¡š„对象˜q›è¡Œrelease操作。ä‹D一个简单的例子来说明吧åQŒé¦–先看一ŒDµJava代码åQ?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">public class Test{<br />        public static void main(String[] args){<br />                String s = “This is a test string”;<br />                s = s.substring(s.indexOf(“a”),(s.length()));<br />                System.out.println(s);<br />                <br />        }<br />}</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    ˜q™ç§å†™æ³•在Java中很常见也很普遍åQŒè¿™ä¸ä¼šäº§ç”Ÿä»ÖM½•问题。但是到äº?Objective-C 中,ž®×ƒ¼šå‡ÞZº‹åQŒè€ƒè™‘˜q™ä¸ª½E‹åºåQ?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; "><span style="color: #339966; ">#import <Foundation/Foundation.h><br /><br />int main (int argc, const char * argv[]) {<br />NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];<br />        NSString* s = [[NSString alloc]initWithString:@”This is a test string”];<br />        s = [s substringFromIndex:[s rangeOfString:@"a"].location];//内存泄露<br />        [s release];//错误释放<br />[pool drain];//EXC_BAD_ACCESS<br />return 0;<br />}</span><br /><br />    ˜q™ä¸ªä¾‹å­å½“然狠容易的看出问题所在,如果˜q™æ®µä»£ç åŒ…含在一个很大的逻辑中,¼‹®å®žå®ÒŽ˜“被忽略。Objective-C ˜q™æ®µä»£ç æœ‰ä¸‰ä¸ªè‡´å‘½é—®é¢˜ï¼š1、内存泄éœÔŒ¼›2、错误释放;3、造成 EXC_BAD_ACCESS 错误ã€?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    1åQ?NSString* s = [[NSString alloc]initWithString:@”This is a test string”]; 创徏了一ä¸?NSString ObjectåQŒéšåŽçš„ s = [s substringFromIndex:[s rangeOfString:@"a"].location]; æ‰§è¡ŒåŽï¼Œå¯ÆD‡´åˆ›å¾çš„对象引用消失,直接造成内存泄露ã€?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    2åQŒé”™è¯¯é‡Šæ”¾ã€‚[s release]; ˜q™ä¸ªé—®é¢˜åQŒåŽŸå› ä¹‹ä¸€æ˜¯ä¸€ä¸ªé€»è¾‘é”™è¯¯åQŒä»¥ä¸?s ˜q˜æ˜¯æˆ‘们最初创建的那个 NSString å¯¹è±¡ã€‚ç¬¬äºŒæ˜¯å› äØ“ä»?substringFromIndex:(NSUInteger i) ˜q™ä¸ªæ–ÒŽ³•˜q”回çš?NSString 对象åQŒåƈ不需要我们来释放åQŒå®ƒå…¶å®žæ˜¯ä¸€ä¸ªè¢« substringFromIndex æ–ÒŽ³•标记ä¸?autorelease 的对象。如果我们强行的释放了它åQŒé‚£ä¹ˆä¼šé€ æˆ EXC_BAD_ACCESS 问题ã€?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    3åQ?EXC_BAD_ACCESS。由äº?s 指向çš?NSString 对象被标è®îCØ“ autorelease, 则在 NSAutoreleasePool 中已有记录。但是由于我们在前面错误的释放了该对象,则当 [pool drain] 的时候,NSAutoreleasePool 又一‹Æ¡çš„对它记录çš?s 对象调用äº?release æ–ÒŽ³•åQŒä½†˜q™ä¸ªæ—¶å€?s 已经被释放不复存在,则直接导致了 EXC_BAD_ACCESS问题ã€?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    那么åQŒçŸ¥é“了 EXC_BAD_ACCESS 的诱因之一后,如何快速高效的定位问题åQ?/p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">1: 为工½E‹è¿è¡Œæ—¶åŠ å…¥ NSZombieEnabled 环境变量åQŒåÆˆè®¾äØ“å¯ç”¨åQŒåˆ™åœ?EXC_BAD_ACCESS 发生æ—Óž¼ŒXCode çš?Console 会打印出问题描述ã€?/p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">首先双击 XCode 工程中,Executables 下的 可执行模¾l„,</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; text-align: center; "><img width="469" height="311" border="0" alt="" src="http://www.cocoachina.com/cms/uploads/allimg/110219/8_110219221940_1.png" data-pinit="registered" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; cursor: pointer; " /></p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">在弹出窗口中åQŒVariables to be set in the environmentåQŒæ·»åŠ?NSZombieEnabledåQŒåƈ讑֮šä¸?YESåQŒç‚¹å‡»é€‰ä¸­å¤é€‰æ¡†å¯ç”¨æ­¤å˜é‡ã€?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; text-align: center; "><img width="290" height="415" border="0" alt="" src="http://www.cocoachina.com/cms/uploads/allimg/110219/8_110219222206_1.png" data-pinit="registered" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; cursor: pointer; " /></p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    ˜q™æ ·åQŒè¿è¡Œä¸Š˜q?Objective-C 时会看到控制台输出:Untitled[3646:a0f] *** -[CFString release]: message sent to deallocated instance 0x10010d340</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; text-align: center; "><img width="472" height="344" border="0" alt="" src="http://www.cocoachina.com/cms/uploads/allimg/110219/8_110219222424_1.png" data-pinit="registered" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; cursor: pointer; " /></p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    ˜q™æ¡æ¶ˆæ¯å¯¹äºŽå®šä½é—®é¢˜æœ‰å¾ˆå¥½çš„æç¤ºä½œç”¨ã€‚但是很多时候,只有˜q™æ¡æç¤ºæ˜¯ä¸å¤Ÿçš„åQŒæˆ‘们需要更多的提示来帮助定位问题,˜q™æ—¶å€™å†åŠ å…¥ MallocStackLogging 来启用malloc记录ã€?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; text-align: center; "><img width="291" height="414" border="0" alt="" src="http://www.cocoachina.com/cms/uploads/allimg/110219/8_110219222612_1.png" data-pinit="registered" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; cursor: pointer; " /></p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; "><br />    当错误发生后åQŒåœ¨¾lˆç«¯æ‰§è¡ŒåQ?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; "><span style="color: #339966; ">malloc_history ${App_PID} ${Object_instance_addr}</span></p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    则会获得相应çš?malloc 历史记录åQŒæ¯”如对于上一个控制台输出</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; "><span style="color: #339966; ">Untitled[3646:a0f] *** -[CFString release]: message sent to deallocated instance 0x10010d340</span></p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    则我们可以在¾lˆç«¯æ‰§è¡ŒåQŒç»“果如下:</p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">Buick-Wongs-MacBook-Pro:Downloads buick$ malloc_history 3646 0x10010d340<br />malloc_history Report Version: 2.0<br />Process: Untitled [3646]<br />Path: /Users/buick/Desktop/Untitled/build/Debug/Untitled<br />Load Address: 0×100000000<br />Identifier: Untitled<br />Version: ??? (???)<br />Code Type: X86-64 (Native)<br />Parent Process: gdb-i386-apple-darwin [3638]<br /><br />Date/Time: 2011-02-01 15:07:04.181 +0800<br />OS Version: Mac OS X 10.6.6 (10J567)<br />Report Version: 6<br /><br />ALLOC 0x10010d340-0x10010d357 [size=24]: thread_7fff70118ca0 |start | main | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | +[NSString initialize] | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | NXCreateMapTableFromZone | malloc_zone_malloc<br />—-<br />FREE 0x10010d340-0x10010d357 [size=24]: thread_7fff70118ca0 |start | main | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | _finishInitializing | free<br /><br />ALLOC 0x10010d340-0x10010d357 [size=24]: thread_7fff70118ca0 |start | main | -[NSPlaceholderString initWithString:] | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | _class_initialize | +[NSMutableString initialize] | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | NXCreateMapTableFromZone | malloc_zone_malloc<br />—-<br />FREE 0x10010d340-0x10010d357 [size=24]: thread_7fff70118ca0 |start | main | -[NSPlaceholderString initWithString:] | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | _class_initialize | _finishInitializing | free<br /><br />ALLOC 0x10010d340-0x10010d35f [size=32]: thread_7fff70118ca0 |start | main | -[NSCFString substringWithRange:] | CFStringCreateWithSubstring | __CFStringCreateImmutableFunnel3 | _CFRuntimeCreateInstance | malloc_zone_malloc</p><p id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    ˜q™æ ·ž®±å¯ä»¥å¾ˆå¿«çš„定位出问题的代码片段了,注意输出的最后一行,åQŒï¼Œ˜q™è¡Œè™½ç„¶ä¸æ˜¯é—®é¢˜çš„æœ€¾lˆåŽŸå› ï¼Œä½†æ˜¯¼›»é—®é¢˜ç‚¹å·²ç»å¾ˆè¿‘了,随着它找下去åQŒå…«æˆå°±ä¼šæ‰¾åˆ°é—®é¢˜ã€?/p></div></div><img src ="http://www.aygfsteel.com/fastzch/aggbug/367925.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fastzch/" target="_blank">Robin's Programming World</a> 2012-01-05 16:18 <a href="http://www.aygfsteel.com/fastzch/archive/2012/01/05/367925.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[copy]创业公司应该如何招ähåQ?/title><link>http://www.aygfsteel.com/fastzch/archive/2011/12/31/367620.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Sat, 31 Dec 2011 02:24:00 GMT</pubDate><guid>http://www.aygfsteel.com/fastzch/archive/2011/12/31/367620.html</guid><wfw:comment>http://www.aygfsteel.com/fastzch/comments/367620.html</wfw:comment><comments>http://www.aygfsteel.com/fastzch/archive/2011/12/31/367620.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fastzch/comments/commentRss/367620.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fastzch/services/trackbacks/367620.html</trackback:ping><description><![CDATA[<div><div class="wmqeeuq" id="xvh" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 8px; margin-left: 0px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 22px; "><h2>创业公司应该如何招ähåQ?/h2></div><div xu"="" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; height: 1px; width: 632px; border-top-style: solid; border-top-width: 3px; border-top-color: #dddddd; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #dddddd; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 22px; "></div><div class="wmqeeuq" id="xwg" style="outline-style: none; outline-width: initial; outline-color: initial; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #dddddd; margin-top: 0px; margin-right: 0px; margin-bottom: 6px; margin-left: 0px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 22px; "><div class="wmqeeuq" id="aa-1091" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 6px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; position: relative; border-image: initial; "><div style="outline-style: none; outline-width: initial; outline-color: initial; "><h3><a style="color: #105cb6; outline-style: none; outline-width: initial; outline-color: initial; text-decoration: none; float: right; height: 25px; width: 25px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 5px; "><img src="http://p1.zhimg.com/73/ae/73ae1de85_s.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-color: initial; border-image: initial; float: left; height: 25px; margin-top: 0px; margin-right: 10px; margin-bottom: 5px; margin-left: 0px; width: 25px; border-color: initial; " alt="" /></a><a style="color: #105cb6; outline-style: none; outline-width: initial; outline-color: initial; text-decoration: none; ">周源</a> <strong title="知乎 001 号员å·?>åQŒçŸ¥ä¹?001 号员å·?/strong></h3></div><div style="outline-style: none; outline-width: initial; outline-color: initial; font-size: 12px; color: #999999; ">374 ¼œ¨ï¼Œæ¥è‡ª é‡‘错刀, ZX, ½E‹éž <a id="xbtw" style="color: #105cb6; outline-style: none; outline-width: initial; outline-color: initial; text-decoration: none; ">更多</a></div><div style="outline-style: none; outline-width: initial; outline-color: initial; "><div style="outline-style: none; outline-width: initial; outline-color: initial; ">其实ä»?08 òq´åˆ°çŽ°åœ¨åQŒæˆ‘一直想˜q™äº‹èƒ½ä¸èƒ½æœ‰ç‚¹çªé—¨ï¼Œæˆ–者是实用的方法,¾l“论是几乎没有ã€?br /><br />我用˜q‡çš„大家都用的方法:<br /><br /><ul style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; "><li>在水木上发脓子(有点效果åQ?br /></li><li>在蓝色理想上发脓子(无效åQ?br /></li><li>在技术邮件组里发贴子åQˆæ— æ•ˆï¼‰</li><li>ä¹?51job/æ™ø™” 最便宜的服务(有点效果åQ?/li><li>¾l™æ‰€æœ‰å¯ä»¥æƒ³åˆ°çš„人打电话åQŒè¯·ä»–们推荐åQˆæ— æ•ˆï¼‰<br /></li><li>¾l™æ‰€æœ‰å’Œä½ è®¨è®ø™¿‡åˆ›ä¸šåQŒå–˜q‡ç‚¹ž®é…’çš„äh打电话(无效åQ?br /></li><li>¾U¦å‰åŒäº‹¿Uä¸‹è°ˆï¼ˆæœ‰æ•ˆåQ?br /></li></ul><br />我用˜q‡çš„大家可能没有用的æ–ÒŽ³•åQ?br /><br /><ul style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; "><li>ä¸?twitteråQŒçœ‹ XXX çš?followeråQŒä¸€ä¸ªä¸€ä¸ªçœ‹åQŒçœ‹ä»–们çš?twitteråQŒåšå®¢ï¼ŒGoogle Reader 分äínåQŒæƒ³åŠžæ³•æžåˆ°é‚®äšgåQŒè”¾p»ï¼ŒåŠå¤œç”µè¯éªšæ‰°ã€?br /></li><li>上豆瓣,前端后端挑几本重量çñ”的书åQŒåŽ»æ‰¾æƒ³çœ‹ï¼Œçœ‹è¿‡åQŒæ­£åœ¨çœ‹˜q™æœ¬ä¹¦çš„人,一个一个看åQŒçœ‹ä»–们的活动,博客åQŒGoogle Reader 分äínåQŒæƒ³åŠžæ³•æžåˆ°é‚®äšgåQŒè”¾p»ï¼ŒåŠå¤œç”µè¯éªšæ‰°ã€?br /></li><li>扑֐Œäº‹ï¼Œé—®ä»–们都看什么技术博客,惛_Šžæ³•æžåˆ°é‚®ä»Óž¼Œè”ç³»åQŒåŠå¤œç”µè¯éªšæ‰°ã€?br /></li></ul><br />谈几点体会:<br /><br /><strong>不要太指望周围的äº?/strong><br /><br />从社招和校园招聘½{›é€‰åˆ¾U§äh才的æ–ÒŽ³•不适合创业公司åQŒæ‰€ä»¥åˆ›ä¸šè€…只能靠自己åŽÕd½“猎头åQŒä»Žä½ å‘¨å›´çš„人,同学åQŒæœ‹å‹ï¼Œå’ŒæŽ¥è§¦è¿‡çš„公司员工开始ã€?br /><br />˜q™æ˜¯äº‹å®žåQŒä¹Ÿæ˜¯é™·é˜±ã€‚周围的人在能力上恰好满­‘›_ˆ›ä¸šéœ€æ±‚的可能极低åQŒäh情债又­‘…高åQŒå¯¹æ–¹å…¶å®žå¾ˆå‹‰å¼ºåQŒä½†ä½ å´è‡†æƒ³ä»–完全胜任,动之以情拉入伙,¾l“æžœž®±æ˜¯æ’‘ä¸äº†å¤šä¹…ï¼Œå•çº¯é äº¤æƒ…äØ“¾U½å¸¦åQŒå¾ˆå¿«å°±ä¼šé€æ”¯å¾—一òq²äºŒå‡€ã€?br /><br /><strong>别以ä¸ÞZh人都惛_ˆ›ä¸?/strong><br /><br />我在招äh的过½E‹ä¸­é‡åˆ°˜q‡å¾ˆå¤šå¾ˆèªæ˜Žçš„ähåQŒä¹Ÿé‡åˆ°˜q‡å¾ˆå¤šç‹¬ç‰¹çš„人,但到了最后一刻,他们会犹豫,把创业视为机会者,会自己鼓åŠÞp‡ªå·±ï¼Œä½†é—®é¢˜æ˜¯å¤ªå¤šçš„äh实际上都只看åˆîCº†åˆ›ä¸šé£Žé™©çš„一面,选择时会們֐‘于规遉K£Žé™©ã€?br /><br />˜q˜æœ‰åQŒå³ä½¿æ˜¯æœ‰èƒ½åŠ›çš„å¿ƒæœ‰æ¢¦æƒ³è€…ï¼Œä¹Ÿä¼šæœ‰å¾ˆå¤šçš„å®žé™…æƒ…å†µåQŒäؓ知乎招ähæ—Óž¼Œæœ‰äh安™‡Œæœ‰é‡ç—…患者,无法从事需要加班的工作åQŒæœ‰äººæ— æ³•换城市åQŒæœ‰äºø™‡ªç”׃¹ æƒ¯äº†åQŒæœ‰æ—¶å€™ï¼Œä»–们和你通电话,只是想知道你正在做的事情ã€?/div></div></div></div></div><img src ="http://www.aygfsteel.com/fastzch/aggbug/367620.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fastzch/" target="_blank">Robin's Programming World</a> 2011-12-31 10:24 <a href="http://www.aygfsteel.com/fastzch/archive/2011/12/31/367620.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]自定义UITableViewhttp://www.aygfsteel.com/fastzch/archive/2011/12/29/367465.htmlRobin's Programming WorldRobin's Programming WorldThu, 29 Dec 2011 01:12:00 GMThttp://www.aygfsteel.com/fastzch/archive/2011/12/29/367465.htmlhttp://www.aygfsteel.com/fastzch/comments/367465.htmlhttp://www.aygfsteel.com/fastzch/archive/2011/12/29/367465.html#Feedback1http://www.aygfsteel.com/fastzch/comments/commentRss/367465.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/367465.html
原文地址åQ?http://blog.sina.com.cn/s/blog_7e3132ca0100wyls.html
在XCode对应头文件中修改该类所¾l§æ‰¿çš„父¾c»ï¼š
@interface TableViewController:UIViewController <UITableViewDataSource, UITableViewDelegate>
{
}
在对应的.mæ–‡äšg中添加如下代码:
@implementation TableViewController
{
UITableView *tableView = [[UITableView alloc]initWithFrame:CGRectMake(0,0,320,460) style:UITableViewStylePlain];
tableView.dataSource = self;
tableView.delegate = self;
[self.view addSubview:tableView];
}
˜q™æ ·ž®±åœ¨view上添加了一个tableViewåQŒä½†å…¶æ ·å¼æ˜¯é»˜è®¤çš„,其中的内容也是空白的åQŒè€Œä¸”此时是无法运行的åQŒå› ä¸ºåœ¨å¤´æ–‡ä»¶ä¸­æ·ÕdŠ äº†UITableViewDataSourceå’ŒUITableViewDelegate两个¾c»ï¼Œæ‰€ä»¥å¿…™å»è®¾¾|®ä¸€äº›è‡ªå®šä¹‰tableView样式的方法,下面列ä‹D了一些相关的æ–ÒŽ³•åQ?/div>
讄¡½®Cell高度åQ?/div>
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
讄¡½®SectionHeader高度åQ?/div>
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
讄¡½®SectionFooter高度åQ?/div>
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
讄¡½®Sectionæ•°ç›®åQ?/div>
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
 
讄¡½®SectionHeader内容åQ?/div>
-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
讄¡½®å„个Section中的Cell个数åQ?nbsp;
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
讄¡½®Cell内容åQ?nbsp;
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 
讄¡½®Cell行羃˜q›é‡åQ?/div>
-(NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath
讄¡½®Cell被选中响应前动ä½?例如åQšå¯ç”¨ä»¥åˆ¤æ–­é€‰ä¸­çš„Cell,来阻止其响应åQ?/div>
-(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
讄¡½®Cell选中触发响应åQ?/div>
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath


]]>【è{】Xcode分析CrashLog的方æ³?/title><link>http://www.aygfsteel.com/fastzch/archive/2011/12/28/367403.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Wed, 28 Dec 2011 04:24:00 GMT</pubDate><guid>http://www.aygfsteel.com/fastzch/archive/2011/12/28/367403.html</guid><wfw:comment>http://www.aygfsteel.com/fastzch/comments/367403.html</wfw:comment><comments>http://www.aygfsteel.com/fastzch/archive/2011/12/28/367403.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fastzch/comments/commentRss/367403.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fastzch/services/trackbacks/367403.html</trackback:ping><description><![CDATA[<h1 class="entry-title" style="border-top-width: 0px; clear: both; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px; word-spacing: 0px; font: bold 21px/1.3em 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif; vertical-align: baseline; text-transform: none; color: rgb(0,0,0); text-indent: 0px; padding-top: 0px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"> </h1> <div id="wmqeeuq" class="entry-content" style="border-top-width: 0px; clear: both; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px; word-spacing: 0px; font: 16px/24px Georgia, 'Bitstream Charter', serif; vertical-align: baseline; text-transform: none; color: rgb(51,51,51); text-indent: 0px; padding-top: 12px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">原文地址åQ?a >http://www.acwind.net/blog/?p=1090</a><br /><br />Bug是永˜qœä¼´éšç€½E‹åºå‘˜ä»¬çš„东西,各种各样的情况造成½E‹åºcrashæŽ‰ä¹Ÿæ˜¯å®¶å¸æ€¾¿é¥­ã€‚Windows下的很多大型软äšg在崩溃的时候,都会弹出提示框,询问用户是否ž®†crash的信息发送到软äšg厂商åQŒä»¥ä¾›èÊY件开发商debug。App store中的软äšg也有˜q™ä¸ªåŠŸèƒ½åQŒç”¨æˆ·åœ¨ä½¿ç”¨è½¯äšg的时候,如果½E‹åºå´©æºƒåQŒé”™è¯¯ä¿¡æ¯ä¼šå‘送到Apple的服务器中,软äšg的开发者们可以很方便在后台获得自己½E‹åºçš„crash logåQŒä¾›è‡ªå·±è°ƒè¯•ã€?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">但随之而来的问题是åQŒæˆ‘们收到的½E‹åºå´©æºƒè°ƒè¯•信息多半是汇¾~–语­a€ä¸€æ ïLš„堆栈代码åQŒåŒæ—¶è¿™äº›ä¿¡æ¯åƈ不是在我们debug的时候äñ”生,所以看到这一串crash log的天书,常常无可奈何。Xcode很好的解决了˜q™ä¸€é—®é¢˜åQŒå®ƒæ‰€æä¾›çš„Orgainzer分析器加上symbolicatecrash,可以分析二进制文件以及源代码和crashlog之间的连接,直接扑ևºæºç¨‹åºä¸­å‡ºé”™çš„代码行。方法网上到处是åQŒæœ¬æ–‡ä¸è®¨è®ºã€?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">但是如果使用symbolicatecrash无法定位到出错的代码行的话åQŒæ€Žä¹ˆæ•´å‘¢åQŸæœ‰ä¸€ä¸ªåŠžæ³•ï¼Œå¦‚ä¸‹åQ?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">首先查看crash log中的崩溃¾U¿ç¨‹åQŒå‡å¦‚是˜q™æ ·çš„:</p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">Thread 0 Crashed:<br />0   libobjc.A.dylib              <span id="wmqeeuq" class="Apple-converted-space"> </span><span style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px; vertical-align: baseline; padding-top: 0px; white-space: pre; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial"> </span>0x00003ec0 objc_msgSend + 24<br />1   MyApp               0x000036d2 0×1000 + 9938ï»?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">我们得到了用户发生崩溃情å†ëŠš„内存地址åQ?x000036d2ï»?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">然后回到我们应用½E‹åºçš„build目录åQŒç›®å½•下一定要包含MyApp.app å’ŒMyApp.app.dSYM两个文äšgã€?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">在控制台使用dwarfdump命ä×oåQŒè§£æžå‡ºå†…存地址åQŒå¦‚åQ?nbsp;</p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">dwarfdump –lookup 0x000036d2 –arch armv6 MyApp.app.dSYM</p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">输出信息如下åQ?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial"><img title="dwarfdump.jpg" style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial" height="149" alt="dwarfdump.jpg" src="http://www.acwind.net/blog/wp-content/uploads/2010/06/dwarfdump.jpg" width="534" border="0" /></p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">直接定位åˆîC»£ç çš„出错行,CoolåQ?/p></div><img src ="http://www.aygfsteel.com/fastzch/aggbug/367403.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fastzch/" target="_blank">Robin's Programming World</a> 2011-12-28 12:24 <a href="http://www.aygfsteel.com/fastzch/archive/2011/12/28/367403.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转] Objective-C内存½Ž¡ç†æ•™ç¨‹å’ŒåŽŸç†å‰–æžå£è¯€ä¸ŽèŒƒå¼?/title><link>http://www.aygfsteel.com/fastzch/archive/2011/12/01/365258.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Thu, 01 Dec 2011 01:25:00 GMT</pubDate><guid>http://www.aygfsteel.com/fastzch/archive/2011/12/01/365258.html</guid><wfw:comment>http://www.aygfsteel.com/fastzch/comments/365258.html</wfw:comment><comments>http://www.aygfsteel.com/fastzch/archive/2011/12/01/365258.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fastzch/comments/commentRss/365258.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fastzch/services/trackbacks/365258.html</trackback:ping><description><![CDATA[<span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: normal; "> <table width="100%" class="Framework" cellspacing="0" cellpadding="0" style="background-color: #eeeeee; "> <tbody> <tr> <td class="MainCell" width="100%" style="font-size: 12px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; background-color: white; vertical-align: top; "> <div class="wmqeeuq" id="main"> <div id="wmqeeuq" class="post" style="border-left-color: #cccccc; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-bottom: 28px; "> <div id="wmqeeuq" class="posthead" style="background-color: #eeeeee; background-image: url(http://www.cnblogs.com/Skins/HabaHaba/images/PostHeaderBg.gif); padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; color: #444444; font-size: 9px; background-position: 50% 100%; background-repeat: repeat no-repeat; "> <h2 style="margin-top: 0px; font-size: 13px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a id="ctl03_TitleUrl" class="singleposttitle" style="color: #223355; text-decoration: none; ">iPhone/Mac Objective-C内存½Ž¡ç†æ•™ç¨‹å’ŒåŽŸç†å‰–æž?äº?口诀与范å¼?/a></h2> Posted on 2010-03-08 00:35 <a style="color: #223355; text-decoration: none; ">Vince Yuan</a> é˜…读(2331) <a style="color: #223355; text-decoration: none; ">评论(1)</a> <a rel="nofollow" style="color: #223355; text-decoration: none; ">¾~–辑</a> <a style="color: #223355; text-decoration: none; ">收藏</a> <img src="http://www.cnblogs.com/VinceYuan/aggbug/1680492.html?type=1&webview=1" width="1px" height="1px" alt="" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; " /></div> <div id="wmqeeuq" class="postbody" style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; margin-bottom: 14px; font-size: 13px; line-height: 1.5; "> <div class="wmqeeuq" id="cnblogs_post_body"> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span style="font-size: 13px; font-family: 宋体; ">版权声明</span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span style="font-size: 13px; font-family: 宋体; ">此文版权归作è€?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">Vince Yuan (vince.yuan#gmail.com)</font></span><span style="font-size: 13px; font-family: 宋体; ">所有。欢˜qŽéžè¥åˆ©æ€§è{载,转蝲时必™åÕdŒ…含原始链æŽ?/span><span lang="EN-US" style="font-size: 13px; "><a target="_blank" style="color: #1d58d1; text-decoration: none; "><font face="Calibri">http://vinceyuan.cnblogs.com</font></a></span><span style="font-size: 13px; font-family: 宋体; ">åQŒä¸”必须包含此版权声明的完整内容ã€?/span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span style="font-size: 13px; font-family: 宋体; "></span><span style="font-size: 13px; font-family: 宋体; "></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span style="font-size: 13px; font-family: 宋体; "></span> </p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span style="font-size: 13px; font-family: 宋体; ">版本</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"> 1.1<span style="font-size: 13px; "> </span></font></span><span style="font-size: 13px; font-family: 宋体; ">发表äº?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">2010-03-08</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "> </p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span style="font-size: 13px; font-family: 宋体; ">äº?/span><font face="Calibri"> </font><span style="font-size: 13px; font-family: 宋体; ">口诀与范å¼?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 21.25pt; margin-bottom: 0pt; text-indent: -21.25pt; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">1</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">           </span></span></span><span style="font-size: 13px; font-family: 宋体; ">口诀ã€?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">1.1</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">谁创建,谁释放(¾cÖM¼¼äº?#8220;谁污染,谁治ç?#8221;åQ‰ã€‚如果你通过</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">alloc</font></span><span style="font-size: 13px; font-family: 宋体; ">ã€?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">new</font></span><span style="font-size: 13px; font-family: 宋体; ">æˆ?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">copy</font></span><span style="font-size: 13px; font-family: 宋体; ">来创å»ÞZ¸€ä¸ªå¯¹è±¡ï¼Œé‚£ä¹ˆä½ å¿…™å»è°ƒç”?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">æˆ?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">。换句话è¯ß_¼Œä¸æ˜¯ä½ åˆ›å»ºçš„åQŒå°±ä¸ç”¨ä½ åŽ»é‡Šæ”¾ã€?/span><span lang="EN-US" style="font-size: 13px; "><br /> </span><span style="font-size: 13px; font-family: 宋体; ">例如åQŒä½ åœ¨ä¸€ä¸ªå‡½æ•îC¸­</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">alloc</font></span><span style="font-size: 13px; font-family: 宋体; ">生成了一个对象,且这个对象只在这个函æ•îC¸­è¢«ä‹É用,那么你必™åÕdœ¨˜q™ä¸ªå‡½æ•°ä¸­è°ƒç”?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">æˆ?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">。如果你在一ä¸?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">class</font></span><span style="font-size: 13px; font-family: 宋体; ">的某个方法中</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">alloc</font></span><span style="font-size: 13px; font-family: 宋体; ">一个成员对象,且没有调ç”?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">åQŒé‚£ä¹ˆä½ éœ€è¦åœ¨˜q™ä¸ª¾cȝš„</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">æ–ÒŽ³•中调ç”?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">åQ›å¦‚果调用了</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">åQŒé‚£ä¹ˆåœ¨</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">æ–ÒŽ³•中什么都不需要做ã€?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">1.2</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">除了</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">alloc</font></span><span style="font-size: 13px; font-family: 宋体; ">ã€?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">new</font></span><span style="font-size: 13px; font-family: 宋体; ">æˆ?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">copy</font></span><span style="font-size: 13px; font-family: 宋体; ">之外的方法创建的对象都被声明äº?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">ã€?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">1.3</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">è°?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">retain</font></span><span style="font-size: 13px; font-family: 宋体; ">åQŒè°</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">。只要你调用äº?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">retain</font></span><span style="font-size: 13px; font-family: 宋体; ">åQŒæ— è®ø™¿™ä¸ªå¯¹è±¡æ˜¯å¦‚何生成的,你都要调ç”?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">。有时候你的代码中明明没有</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">retain</font></span><span style="font-size: 13px; font-family: 宋体; ">åQŒå¯æ˜¯ç³»¾lŸä¼šåœ¨é»˜è®¤å®žçŽîC¸­åŠ å…¥</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">retain</font></span><span style="font-size: 13px; font-family: 宋体; ">。不知道ä¸ÞZ»€ä¹ˆè‹¹æžœå…¬å¸çš„æ–‡æ¡£æ²¡æœ‰å¼ø™°ƒ˜q™ä¸ªéžå¸¸é‡è¦çš„一点,请参考范å¼?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">2.7</font></span><span style="font-size: 13px; font-family: 宋体; ">和第三章ã€?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 21.25pt; margin-bottom: 0pt; text-indent: -21.25pt; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">           </span></span></span><span style="font-size: 13px; font-family: 宋体; ">范式ã€?/span><span lang="EN-US" style="font-size: 13px; "><br /> </span><span style="font-size: 13px; font-family: 宋体; ">范式ž®±æ˜¯æ¨¡æ¿åQŒå°±æ˜¯ä¾è‘«èЦç”ȝ“¢ã€‚由于不同äh有不同的理解和习惯,我æ€È»“的范式不一定适合所有ähåQŒä½†æˆ‘能保证照着˜q™æ ·åšä¸ä¼šå‡ºé—®é¢˜ã€?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.1</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">创徏一个对象ã€?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">ClassA *obj1 = [[ClassA alloc] init];</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.2</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">创徏一ä¸?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">的对象ã€?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">ClassA *obj1 = [[[ClassA alloc] init] autorelease];</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.3</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">Release</font></span><span style="font-size: 13px; font-family: 宋体; ">一个对象后åQŒç«‹åÏxŠŠæŒ‡é’ˆæ¸…ç©ºã€‚ï¼ˆ™åÞZ¾¿è¯´ä¸€å¥ï¼Œ</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">一个空指针是合法的åQŒä½†ä¸ä¼šå‘生ä»ÖM½•事情åQ?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">[obj1 release];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">obj1 = nil;</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.4</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">指针赋值给另一个指针ã€?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">ClassA *obj2 = obj1;</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">[obj2 retain];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">//do something</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">[obj2 release];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">obj2 = nil;</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.5</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">在一个函æ•îC¸­åˆ›å¾òq¶è¿”回对象,需要把˜q™ä¸ªå¯¹è±¡è®„¡½®ä¸?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">ClassA *Func1()</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">  </span>ClassA *obj = [[[ClassA alloc]init]autorelease];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">  </span>return obj;</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.6</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">在子¾cȝš„</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">æ–ÒŽ³•中调用基¾cȝš„</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">æ–ÒŽ³•</span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">-(void) dealloc</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>…</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>[super dealloc];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">在一ä¸?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">class</font></span><span style="font-size: 13px; font-family: 宋体; ">中创建和使用</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">ã€?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.1</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">声明一个成员变量ã€?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.5pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">ClassB *objB;</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.2</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">声明</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">åQŒåŠ ä¸?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">retain</font></span><span style="font-size: 13px; font-family: 宋体; ">参数ã€?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@property (retain) ClassB* objB;</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.3</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">定义</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">。(</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">的默认实现请看第三章åQ?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@synthesize objB;</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.4</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">除了</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">æ–ÒŽ³•以外åQŒå§‹¾lˆç”¨</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">.</font></span><span style="font-size: 13px; font-family: 宋体; ">操作½W¦çš„æ–¹å¼æ¥è°ƒç”?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">ã€?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.5pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">self.objB </font></span><span style="font-size: 13px; font-family: 宋体; ">或è€?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">objA.objB</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.5</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">åœ?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">æ–ÒŽ³•ä¸?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">˜q™ä¸ªæˆå‘˜å˜é‡ã€?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.5pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">[objB release];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span style="font-size: 13px; font-family: 宋体; ">½CÞZ¾‹ä»£ç å¦‚下åQˆè¯¦¾l†ä»£ç è¯·å‚考附件中çš?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">memman-property.m</font></span><span style="font-size: 13px; font-family: 宋体; ">åQŒä½ éœ€è¦ç‰¹åˆ«ç•™æ„å¯¹è±¡æ˜¯åœ¨ä½•时被销毁的。)åQ?/span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@interface ClassA : NSObject</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>ClassB* objB;</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><o:p><font face="Calibri"> </font></o:p></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@property (retain) ClassB* objB;</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@end</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><o:p><font face="Calibri"> </font></o:p></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@implementation ClassA</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@synthesize objB;</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">-(void) dealloc</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>[objB release];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>[super dealloc];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@end</font></span></p> <p class="MsoListParagraph" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.6</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">¾l™è¿™ä¸?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">赋值时åQŒæœ‰æ‰‹åЍ</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">å’?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">两种方式ã€?/span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">void funcNoAutorelease()</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>ClassB *objB1 = [[ClassB alloc]init];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>ClassA *objA = [[ClassA alloc]init];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>objA.objB = objB1;</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>[objB1 release];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>[objA release];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><o:p><font face="Calibri"> </font></o:p></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">void funcAutorelease()</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>ClassB *objB1 = [[[ClassB alloc]init] autorelease];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>ClassA *objA = [[[ClassA alloc]init] autorelease];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>objA.objB = objB1;</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "> </p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "> </p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span style="font-size: 13px; font-family: 宋体; ">½CÞZ¾‹ä»£ç æ–‡äšg链接åQ?/span><span lang="EN-US" style="font-size: 13px; "><a target="_blank" style="color: #1d58d1; text-decoration: none; "><font face="Calibri">http://files.cnblogs.com/VinceYuan/objective-c-memman.zip</font></a></span></p> </div> </div> </div> </div> </td> </tr> </tbody> </table> </span> @import url(http://www.aygfsteel.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);<img src ="http://www.aygfsteel.com/fastzch/aggbug/365258.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fastzch/" target="_blank">Robin's Programming World</a> 2011-12-01 09:25 <a href="http://www.aygfsteel.com/fastzch/archive/2011/12/01/365258.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MAC上查看Adobe AIR的版æœ?/title><link>http://www.aygfsteel.com/fastzch/archive/2011/10/09/360246.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Sun, 09 Oct 2011 01:19:00 GMT</pubDate><guid>http://www.aygfsteel.com/fastzch/archive/2011/10/09/360246.html</guid><wfw:comment>http://www.aygfsteel.com/fastzch/comments/360246.html</wfw:comment><comments>http://www.aygfsteel.com/fastzch/archive/2011/10/09/360246.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fastzch/comments/commentRss/360246.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fastzch/services/trackbacks/360246.html</trackback:ping><description><![CDATA[<p id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown" style="font-size: 1.025em; line-height: 1.462; margin-top: 0px; padding-bottom: 1px; margin-bottom: 1.2em; color: #444444; font-family: Arial, Helvetica; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; ">MAC上看个Adobe AIR的版本没惛_ˆ°å¦‚此复杂åQŒå¤‡å¿˜ä¸€ä¸‹ï¼š</p> <p id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown" style="font-size: 1.025em; line-height: 1.462; margin-top: 0px; padding-bottom: 1px; margin-bottom: 1.2em; color: #444444; font-family: Arial, Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; "><strong>M</strong><strong>ac OS X</strong></p> <ul style="list-style-type: disc; margin-left: 2em !important; padding-left: 2.5ex; margin-top: -8px; margin-bottom: 1.35em; color: #444444; font-family: Arial, Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; orphans: 2; text-align: text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; "> <li id="" style="line-height: 1.25em; font-size: 1.025em; padding-bottom: 0.5em; "><span id="">Open the<span id="wmqeeuq" class="apple-converted-space"> </span></span><span id="">/Library/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/Info.plist</span><span id="wmqeeuq" class="apple-converted-space"> </span>text file and locate<span id="wmqeeuq" class="apple-converted-space"> the<span id="wmqeeuq" class="apple-converted-space"> </span></span><key>CFBundleVersion</key><span id="">entry. The corresponding string entry represents the version of AIR, for example:<span id="wmqeeuq" class="apple-converted-space"> </span></span><string>1.5.3.9130</string> </li> </ul> <div><font color="#444444" face="Arial, Helvetica"><span style="font-size: 12px; line-height: 15px;">原文地址åQ?/span></font></div> <div><font color="#444444" face="Arial, Helvetica"><span style="font-size: 12px; line-height: 15px;"><a >http://kb2.adobe.com/cps/407/kb407625.html</a></span></font></div> @import url(http://www.aygfsteel.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);<img src ="http://www.aygfsteel.com/fastzch/aggbug/360246.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fastzch/" target="_blank">Robin's Programming World</a> 2011-10-09 09:19 <a href="http://www.aygfsteel.com/fastzch/archive/2011/10/09/360246.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Android Media Player 深入观察http://www.aygfsteel.com/fastzch/archive/2011/08/06/355906.htmlRobin's Programming WorldRobin's Programming WorldSat, 06 Aug 2011 00:36:00 GMThttp://www.aygfsteel.com/fastzch/archive/2011/08/06/355906.htmlhttp://www.aygfsteel.com/fastzch/comments/355906.htmlhttp://www.aygfsteel.com/fastzch/archive/2011/08/06/355906.html#Feedback1http://www.aygfsteel.com/fastzch/comments/commentRss/355906.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/355906.html    A. Open coreåQŒstagefright½{‰agent不支持同时存在join stereo å’?stereo两种¾cÕdž‹çš„音乐数据,否则抛出 onCompeletion 事äšgã€?/div>
    B. QuickTime支持得很好,没问题ã€?/div>

2åQŒMedia Player用流数据的话åQŒå¦‚果超˜q?¿U’种没有ä»ÖM½•数据写入åQŒä¾¿ä¼šæŠ›å‡ºbroken pipe异常åQŒè¿™ä¸ªä¹Ÿæ˜¯å¾ˆè®©äh费解的,在网¾lœä¸å¥½æ—¶åQŒå¸¸å¸¸è¶…˜q?¿U’得不到数据ã€?/div>

3åQŒAndroid 2.3.3中,低于128K的音乐数据需要很长时间prepareåQŒå¦‚果是一ä¸?6K的音乐数据,需要超˜q?20¿U’,据观察,臛_°‘需è¦?250,000 bytes以上数据才能使其prepared. 或许˜q™æ˜¯ä¸ÞZº†æ›´å¥½çš„æ’­æ”¾ä½“验在考虑åQŒä½†æ˜¯æœ‰æ—¶å€™ä¼¼ä¹Žé€‚得其反ã€?/div>

4åQŒAndroid 2.2中,低于56K数据的音乐,用流播放æ—Óž¼ŒgetCurrentPosition数据不准¼‹®ï¼Œé€šå¸¸æ’­äº†ä¸€¿U’,˜q™ä¸ªposition只走äº?00åQ?00msåQˆä¾bitrate不同而有所区别åQ‰ã€?nbsp;

另:ImageView 不支持u.s. web coated (SWOP) color workflow。不½Ž¡æ˜¯ä½ æ”¾åœ¨drawable中,用BitmapFactory去decodeåQŒéƒ½æ— æ³•支持ã€?/div>
    其实ä¼ég¹Žæ•´ä¸ªJava都不支持åQŒè¿™ä¸ªæ¯”较奇怪!˜q™å¯æ˜¯å¾ˆ‹¹è¡Œçš„一¿Uæ ¼å¼å‘€åQåšJavaçš„ähçš„æ¯å…øP¼


]]> Ö÷Õ¾Ö©Öë³ØÄ£°å£º ÔÆÑôÏØ| ³¤Í¡ÏØ| Ñ·¿ËÏØ| °¢À­ÉÆÓÒÆì| ÃɳÇÏØ| ¹àÔÆÏØ| ºì°²ÏØ| ̨ÖÐÏØ| Õ¢±±Çø| Ì©ÄþÏØ| ãòË®ÏØ| ÐËÒåÊÐ| Ë«½­| ÓÚÌïÏØ| °×ÓñÏØ| ÎäÂ¡ÏØ| ÓñÉ½ÏØ| ¸ßƽÊÐ| ÃçÀõÏØ| Èê³ÇÏØ| ÂÐÄÏÏØ| ʯÊ×ÊÐ| Ð˰²ÃË| ÖñÉ½ÏØ| ƽ°²ÏØ| ÀæÊ÷ÏØ| ƽÀÖÏØ| »·½­| ±±°²ÊÐ| ¸¢ÁêÇø| ²áºàÏØ| ¼½ÖÝÊÐ| вÌÏØ| ¸ÊµÂÏØ| ½ðƽ| ¿ËÀ­ÂêÒÀÊÐ| ÄϰÄÏØ| ½·áÊÐ| ·Ê³ÇÊÐ| À³ÎßÊÐ| ¶«ÎÚÖéÄÂÇ߯ì|