managed_scope_clear_self_all_dependent_scopes
September 8th 2024
Clear everything allocated inside an atomic scope and all of it's dependent scopes without destroying any of them
Signature
b32
managed_scope_clear_self_all_dependent_scopes(Application_Links* app,
Managed_Scope scope);
Parameters
app
the standard custom layer context pointer
scope
the id of the scope to modify
Return
non-zero if the scope exists and is atomic, zero otherwise
Details
A scope is atomic when it uniquely tied to a specified entity or when it is directly created by the user. By the set-theoretic definition of scopes, a scope is atomic when it's key contains only one atom.
A scope is atomic specifically whenever it satisfies any of these conditions:
1. It is a scope tied to a buffer and returned by buffer_get_managed_scope
2. It is a scope tied to a view and returned by view_get_managed_scope
3. It was created by a call to create_user_managed_scope