MoveTo* MoveTo::Create(float duration, Point pos) { auto moveTo = new MoveTo; moveTo->Init(duration, pos); moveTo->AutoRelease(); return moveTo; }
RepeatForever* RepeatForever::Create(Action* act) { auto repForever = new RepeatForever; repForever->Init(act); repForever->AutoRelease(); return repForever; }
///////////////////////////////////////////////////////////////// // CBase::ReleaseObject // ///////////////////////////////////////////////////////////////// HRESULT CBase::ReleaseObject(ULONG ulExpectedRefCount) { //Release Derived interfaces first... AutoRelease(); //IUnknown TRACE_RELEASE_(m_pIUnknown, L"IUnknown", ulExpectedRefCount); //Cleanup when there are no more references if(ulExpectedRefCount==0) { //Remove this object from the tree, unless there is a window associated with it m_pCMainWindow->m_pCMDIObjects->m_pCObjTree->RemoveObject(this); m_guidSource = GUID_NULL; //Release Parent SAFE_RELEASE(m_pCParent); } return S_OK; }
Node* Node::Create() { auto node = new Node; node->AutoRelease(); return node; }