Smart Pointer 是什麼?
最近為了寫資料庫的程式,由網路上得知可以使用import ADO 元件來輕鬆達成目的。的確程式的開發相當容易,不過據說是因為使用 Smart Pointer 技術所達到的,但是卻不清楚 Smart Pointer 到底是什麼東西。根據 News 上 Jeff Henkels 的回答:
Because the smart pointer is allocated on the stack, it will be destroyed
when it goes out of scope -- its destructor will release the recordset
object.
For more details, look at the smart pointer template class _com_ptr_t,
implemented in comip.h in the MSVC++ INCLUDE directory
真是佩服這些程式開發人員。
Because the smart pointer is allocated on the stack, it will be destroyed
when it goes out of scope -- its destructor will release the recordset
object.
For more details, look at the smart pointer template class _com_ptr_t,
implemented in comip.h in the MSVC++ INCLUDE directory
真是佩服這些程式開發人員。