摘要: 我们在前一章介绍了block的用法,而正确使用block必须要求正确理解block的内存管理问题。这一章,我们只陈述结果而不追寻原因,我们将在下一章深入其原因。一、block放在哪里我们针对不同情况来讨论block的存放位置:1.栈和堆以下情况中的block位于堆中:void foo(){ _... 阅读全文
posted @ 2014-09-30 15:50 wuhn 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 一、概述Block是C级别的语法和运行时特性。Block比较类似C函数,但是Block比之C函数,其灵活性体现在栈内存、堆内存的引用,我们甚至可以将一个Block作为参数传给其他的函数或者Block。二、热身先看一个比较简单的Block例子:int multiplier = 7;int (^myBl... 阅读全文
posted @ 2014-09-30 15:34 wuhn 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 初探nginx架构(100%)众所周知,nginx性能高,而nginx的高性能与其架构是分不开的。那么nginx究竟是怎么样的呢?这一节我们先来初识一下nginx框架吧。nginx在启动后,在unix系统中会以daemon的方式在后台运行,后台进程包含一个master进程和多个worker进程。我们... 阅读全文
posted @ 2014-09-30 10:22 wuhn 阅读(1696) 评论(2) 推荐(0) 编辑
摘要: I know it well:I read it in the grammar long ago.—William Shakespeare, The Tragedy(悲剧;灾难;惨案) of Titus AndronicusThis chapter introduces the grammar of... 阅读全文
posted @ 2014-09-30 02:29 wuhn 阅读(784) 评论(0) 推荐(0) 编辑
摘要: normative ECMAScript Language specification 阅读全文
posted @ 2014-09-30 01:56 wuhn 阅读(140) 评论(0) 推荐(0) 编辑
摘要: I was directed to MDN'sfor..in pagewhen it said, "for..in Iterates over the enumerable properties of an object."Then I went to theEnumerability and ow... 阅读全文
posted @ 2014-09-30 01:53 wuhn 阅读(224) 评论(0) 推荐(0) 编辑
摘要: Thee(你) I’ll chase(追逐;追捕) hence(因此;今后), thou(你;尔,汝) wolf in sheep’s array.—William Shakespeare, The First Part of Henry the SixthAn array is a linear(... 阅读全文
posted @ 2014-09-30 01:43 wuhn 阅读(268) 评论(0) 推荐(0) 编辑