官术网_书友最值得收藏!

Test your knowledge

  1. Swift uses one of the following mechanisms to automatically deallocate the memory used by instances that aren't referenced anymore:
    1. Automatic Random Garbage Collector.
    2. Automatic Reference Counting.
    3. Automatic Instance Map Reduce.
  2. Swift executes an instance's deinitializer:
    1. Before the instance is deallocated from memory.
    2. After the instance is deallocated from memory.
    3. After the instance memory is allocated.
  3. A deinitializer:
    1. Can still access all of the instance's resources.
    2. Can only access the instance's methods but no properties.
    3. Cannot access any of the instance's resources.
  4. Swift allows us to define:
    1. Only one initializer per class.
    2. A main initializer and two optional secondary initializers.
    3. Many initializers with different arguments.
  5. Each time we create an instance:
    1. We must use argument labels.
    2. We can optionally use argument labels.
    3. We don't need to use argument labels.
主站蜘蛛池模板: 长沙县| 太保市| 浙江省| 永安市| 嵩明县| 饶河县| 顺义区| 涪陵区| 青浦区| 迭部县| 林口县| 吐鲁番市| 嵊州市| 北海市| 承德县| 临沂市| 凤台县| 永泰县| 宁津县| 肃南| 洪泽县| 蒙阴县| 淮安市| 丰台区| 临洮县| 大埔区| 永德县| 慈利县| 延津县| 开鲁县| 松原市| 扶余县| 巴中市| 华安县| 武义县| 莎车县| 兴安县| 卢氏县| 哈巴河县| 商丘市| 甘泉县|