dispose method

  1. @protected
  2. @override
void dispose()

Called by deactivate; should contain the actual object deactivation code.

If propose throws an Exception, the default Actor implementation will call dispose to clean up even a partially initialized object.

Implementation

@protected
@override
void dispose() {
  rollback();
  for (var query in _queries.values) ////
    query.deactivate();
  scheme.deactivateUpdatersLookup();
  _begin?.close();
  _begin = null;
  _commit?.close();
  _commit = null;
  _rollback?.close();
  _rollback = null;
  _beginSavepoint?.close();
  _beginSavepoint = null;
  _commitSavepoint?.close();
  _commitSavepoint = null;
  _rollbackSavepoint?.close();
  _rollbackSavepoint = null;
  _insert?.close();
  _insert = null;
  _updateByRowId?.close();
  _updateByRowId = null;
  _updateByKeyId?.close();
  _updateByKeyId = null;
  _deleteByRowId?.close();
  _deleteByRowId = null;
  _deleteByKeyId?.close();
  _deleteByKeyId = null;
  _existsByRowId?.close();
  _existsByRowId = null;
  _existsByKeyId?.close();
  _existsByKeyId = null;
  _selectByRowId?.close();
  _selectByRowId = null;
  _selectByKeyId?.close();
  _selectByKeyId = null;
  _database?.close();
  _database = null;
  super.dispose();
}