MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / destroy

Method destroy

src/jrd/jrd.cpp:5046–5068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5044
5045
5046void SysStableAttachment::destroy(Attachment* attachment)
5047{
5048 {
5049 Database* dbb = attachment->att_database;
5050 SyncLockGuard guard(&dbb->dbb_sys_attach, SYNC_EXCLUSIVE, "SysStableAttachment::destroy");
5051
5052 for (Jrd::Attachment** ptr = &dbb->dbb_sys_attachments; *ptr; ptr = &(*ptr)->att_next)
5053 {
5054 if (*ptr == attachment)
5055 {
5056 *ptr = attachment->att_next;
5057 break;
5058 }
5059 }
5060 }
5061
5062 // Make Attachment::destroy() happy
5063 AttSyncLockGuard async(*getSync(true), FB_FUNCTION);
5064 AttSyncLockGuard sync(*getSync(), FB_FUNCTION);
5065
5066 setInterface(NULL);
5067 Jrd::Attachment::destroy(attachment);
5068}
5069
5070
5071ITransaction* JStatement::execute(CheckStatusWrapper* user_status, ITransaction* apiTra,

Callers 2

~CryptoManagerMethod · 0.45
JRD_shutdown_databaseFunction · 0.45

Calls 1

destroyFunction · 0.50

Tested by

no test coverage detected