[MTOS-dev] MT::ObjectDriverFactory->cleanup() method

Hirotaka Ogawa hirotaka.ogawa at gmail.com
Thu Mar 6 21:58:14 PST 2008


r1456 changeset [1] added MT::ObjectDriverFactory->cleanup() method
which disconnects DB handle and destroy $MT::Object::DRIVER.

http://code.sixapart.com/trac/movabletype/changeset/1456

This is not good.  For example, if we need to implement a destructor
of MT::ObjectDriver::DBI, DB handle has already been disconnected and
we cannot send any commands to DB inside this desctructor.

I think, cleanup() method should make $MT::Object::DRIVER just
'undefined', and MT::ObjectDriver::DBI destructor should make DB
handle disconnected.

How do you think?

-- 
Hirotaka Ogawa makes no sense.
http://as-is.net/blog/


More information about the MTOS-dev mailing list