reference counting for concrete syntaxes

This commit is contained in:
krangelov
2021-11-03 10:48:20 +01:00
parent 2320c6b3b0
commit 309a16d471
7 changed files with 157 additions and 51 deletions

View File

@@ -106,7 +106,15 @@ typedef struct {
struct PGF_INTERNAL_DECL PgfConcr {
size_t ref_count;
Namespace<PgfFlag> cflags;
size_t ref_count_ex;
Namespace<PgfFlag> cflags;
// If there are references from the host language to this concrete,
// then it is included in a double-linked list. If a process
// dies without releasing the reference, it will be released by
// the first process who have an exclusive access to the database.
ref<PgfConcr> prev, next;
PgfText name;
static void release(ref<PgfConcr> pgf);