内核对象与进程控制.pptxVIP

  • 1
  • 0
  • 约1.56千字
  • 约 33页
  • 2020-02-28 发布于上海
  • 举报
预备知识;名词解释;本章授课内容;Windows操作系统;Windows操作系统;Windows操作系统;Windows操作系统;Windows操作系统;内核对象;内核对象;内核对象;内核对象;void String::retain() { (*m_pCount)++; } void String::detain() { if( !(--(*m_pCount) ) ) { delete []m_pData; delete m_pCount; } } int String::count() const { return *m_pCount; } String::~String() { detain(); };String::String( const char* aSrc ):m_pCount(new int(1)) { m_pData = new char[strlen( aSrc )+ 1]; strcpy( m_pData, aSrc ); } String::String( const String aRef ) :m_pCount(aRef.m_pCount),m_pData(aRef.m_pData) { retain(); } String String::

文档评论(0)

1亿VIP精品文档

相关文档