In Z3 there are 2 modes: automatic reference counting and manual.
I understand how manual ref counting works. Thanks to example.
But how does Z3 know when to delete AST node in automatic ref-counting case? Since Z3_ast is a struct from C language => it is impossible to track all assignments and usages of Z3_ast outside Z3 after it was created.
Or Z3 track references inside Z3 only? That is no updates to ref counters are made if you do for example: ast1 = ast2.