From 6efbc7a58f0cf4ce0e00ad074bcaccaa5143036d Mon Sep 17 00:00:00 2001 From: justwe Date: Thu, 8 Oct 2015 09:11:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B010=5FProperties=E7=9A=84Swift?= =?UTF-8?q?=202.0=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/chapter2/10_Properties.md | 1 + 1 file changed, 1 insertion(+) diff --git a/source/chapter2/10_Properties.md b/source/chapter2/10_Properties.md index 1a341cc0..fb806128 100755 --- a/source/chapter2/10_Properties.md +++ b/source/chapter2/10_Properties.md @@ -305,6 +305,7 @@ stepCounter.totalSteps = 896 > 注意: > 跟实例的存储属性不同,必须给存储型类型属性指定默认值,因为类型本身无法在初始化过程中使用构造器给类型属性赋值。 +> 存储型类型属性是延迟初始化的(lazily initialized),它们只有在第一次被访问的时候才会被初始化。即使它们被多个线程同时访问,系统也保证只会对其进行初始化一次,并且不需要对其使用 `lazy` 修饰符。 ###类型属性语法