什么情况下亟需修改FinalConstruct/FinalRelease()的代码

什么情况下需要修改FinalConstruct/FinalRelease()的代码?
ATL工程向导为我们生成的这两个函数特别简单。
我的问题是: 什么时候需要往这两个函数里面添加内容?

HRESULT FinalConstruct()
{
return S_OK;
}

void FinalRelease()
{
}

------解决方案--------------------
类似构造析构函数,放一些初始化,清理动作的代码
------解决方案--------------------
打个断点一看就明白了。
FinalConstruct,一般在这里创建聚合或组合对象。万一那些对象创失败咋办?还好,有返回值!如果返回E_FAIL,那么当前对象就会创建失败。ATL就会把你析构掉,这一点构造函数是无法做到的。
FinalRelease,一般用于调用一些虚函数或者搞一些接口释放,要是在析构函数里调虚函数会死得很惨(Effective C++有讲)。
详情:
The FinalRelease member function is useful for calling virtual member functions and releasing interfaces to other objects that also have pointers back to you. Because those other objects might want to query for an interface during its shutdown sequence, it's just as important to protect the object against double destruction as it was to protect it against premature destruction in FinalConstruct. Even though the FinalRelease member function is called when the object's reference count has been decreased to zero (which is why the object is being destroyed), the caller of FinalRelease artificially sets the reference count to -(LONG_MAX/2) to avoid double deletion. The caller of FinalRelease is the destructor of the most derived class:
CComObject::~CComObject() { 
    m_dwRef = -(LONG_MAX/2);
    FinalRelease();         
    _AtlModule->Unlock();