Logo Search packages:      
Sourcecode: xapian-core version File versions  Download package

void Xapian::Database::Internal::dtor_called (  )  [protected]

Internal method to perform cleanup when a writable database is destroyed with unflushed changes.

A derived class' destructor should call this method before destroying the database to ensure that no sessions or transactions are in progress at destruction time.

Note that it is not safe to throw exceptions from destructors, so this method will catch and discard any exceptions.

Definition at line 302 of file database.cc.

References cancel_transaction(), flush(), and transaction_state.

Referenced by RemoteDatabase::do_close().

    try {
      if (transaction_active()) {
      } else if (transaction_state == TRANSACTION_NONE) {
    } catch (...) {
      // We can't safely throw exceptions from a destructor in case an
      // exception is already active and causing us to be destroyed.

Generated by  Doxygen 1.6.0   Back to index