①调用IL指令newobj,为代表资源的类型分配内存。
②初始化内存,设置资源初始化状态并使资源可用。(类型的实例构造器负责设置初始状态)
③访问类型的成员来使用资源。
④摧毁资源的状态已进行清理。
⑤释放内存。垃圾回收器独自负责这一步。