Exemplo n.º 1
0
MoveTo* MoveTo::Create(float duration, Point pos)
{
	auto moveTo = new MoveTo;
	moveTo->Init(duration, pos);
	moveTo->AutoRelease();

	return moveTo;
}
Exemplo n.º 2
0
RepeatForever* RepeatForever::Create(Action* act)
{
	auto repForever = new RepeatForever;
	repForever->Init(act);
	repForever->AutoRelease();

	return repForever;
}
Exemplo n.º 3
0
/////////////////////////////////////////////////////////////////
// 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;
}
Exemplo n.º 4
0
Node* Node::Create()
{
	auto node = new Node;
	node->AutoRelease();
	return node;
}