1: ULONG __stdcall CClassFactory::Release()
2: {
3: // 参照カウントを1つ減らす
4: m_dwRef--;
5: if (m_dwRef == 0)
6: {
7: // 参照カウントが0であれば,CClassFactoryオブジェクトを破棄する
8: delete this;
9: return 0;
10: }
11: return m_dwRef;
12: }