And since to establish the invariant you often have to acquire resources, you have the destructor to pull down the operating environment and release any resources required.

 
  • 换句话来说,构造函数建立了不变式。而为了建立不变式,你通常需要分配一些资源。
今日热词
目录 附录 查词历史