mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-10-28 01:13:18 -06:00
release the phrasetable when the concrete syntax is released
This commit is contained in:
1 parent
21c5280908
commit
696c3705a2
3 files changed
+29
No files matched your search
@@ -32,6 +32,14 @@ struct PGF_INTERNAL_DECL PgfItem {
|
||||
}
|
||||
} args;
|
||||
|
||||
static
|
||||
void release(ref<PgfItem> item) {
|
||||
size_t ex_size =
|
||||
sizeof(ref<PgfSymbolCCat>) * item->args.size() +
|
||||
sizeof(size_t) * item->vars.size();
|
||||
PgfDB::free(item, ex_size);
|
||||
}
|
||||
|
||||
uint16_t pre_alt;
|
||||
uint16_t pre_dot;
|
||||
uint16_t dot;
|
||||
@@ -91,4 +99,7 @@ void phrasetable_lookup_cohorts(PgfPhrasetable phrasetable,
|
||||
bool case_sensitive,
|
||||
PgfPhraseScanner *scanner, PgfExn* err);
|
||||
|
||||
PGF_INTERNAL_DECL
|
||||
void phrasetable_release(PgfPhrasetable table);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user