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

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.
主站蜘蛛池模板: 黎川县| 廉江市| 柳河县| 永清县| 深圳市| 西丰县| 洛阳市| 衡南县| 周口市| 旺苍县| 芒康县| 祁连县| 漠河县| 东乡县| 商河县| 仁化县| 拜泉县| 唐河县| 怀宁县| 郎溪县| 佛学| 山西省| 凯里市| 禄丰县| 安阳市| 忻州市| 资溪县| 太仓市| 平泉县| 泽库县| 台前县| 寿宁县| 遂宁市| 达拉特旗| 中西区| 秭归县| 齐齐哈尔市| 外汇| 曲水县| 滦平县| 河南省|