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

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.
主站蜘蛛池模板: 阿克苏市| 共和县| 山东省| 三明市| 罗定市| 崇左市| 上思县| 宜昌市| 全州县| 遂平县| 驻马店市| 潮州市| 西畴县| 红河县| 丹阳市| 自治县| 应城市| 石楼县| 商南县| 宜阳县| 贡山| 重庆市| 汾西县| 林芝县| 建阳市| 宽城| 石渠县| 舟曲县| 望城县| 印江| 中西区| 衡东县| 新河县| 湖北省| 青海省| 克什克腾旗| 烟台市| 富顺县| 松潘县| 旬阳县| 吴堡县|