mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 16:42:51 -06:00
at the end of the transaction the old revision is already released.
This commit is contained in:
@@ -1098,13 +1098,8 @@ void pgf_commit_transaction(PgfDB *db, PgfRevision revision,
|
|||||||
DB_scope scope(db, WRITER_SCOPE);
|
DB_scope scope(db, WRITER_SCOPE);
|
||||||
|
|
||||||
ref<PgfPGF> new_pgf = db->revision2pgf(revision);
|
ref<PgfPGF> new_pgf = db->revision2pgf(revision);
|
||||||
ref<PgfPGF> old_pgf = db->get_active_revision();
|
|
||||||
|
|
||||||
db->set_active_revision(new_pgf.as_object());
|
db->set_active_revision(new_pgf.as_object());
|
||||||
|
|
||||||
if (old_pgf != 0)
|
|
||||||
PgfPGF::release(old_pgf);
|
|
||||||
|
|
||||||
db->commit();
|
db->commit();
|
||||||
} PGF_API_END
|
} PGF_API_END
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user