server/modules/selva/module/subscriptions.c
static void destroy_sub(RedisModuleCtx *ctx, SelvaModify_Hierarchy *hierarchy, struct Selva_Subscription *sub) {
    /* Destroy markers. */
    remove_sub_markers(ctx, hierarchy, sub);

    /* Remove missing accessor markers. */
    remove_sub_missing_accessor_markers(hierarchy, sub);

    RB_REMOVE(hierarchy_subscriptions_tree, &hierarchy->subs.head, sub);
    SVector_Destroy(&sub->markers);
#if MEM_DEBUG
    memset(sub, 0, sizeof(*sub));
#endif
    RedisModule_Free(sub);
}
/*
 * Destroy all markers owned by a subscription and destroy the subscription.
 */
Destroy all markers owned by a subscription and destroy the subscription.
Destroy all markers owned by a subscription and destroy the subscription .
static void destroy_sub(RedisModuleCtx *ctx, SelvaModify_Hierarchy *hierarchy, struct Selva_Subscription *sub) {
    remove_sub_markers(ctx, hierarchy, sub);
    remove_sub_missing_accessor_markers(hierarchy, sub);
    RB_REMOVE(hierarchy_subscriptions_tree, &hierarchy->subs.head, sub);
    SVector_Destroy(&sub->markers);
#if MEM_DEBUG
    memset(sub, 0, sizeof(*sub));
#endif
    RedisModule_Free(sub);
}
static void destroy_sub ( RedisModuleCtx * ctx , SelvaModify_Hierarchy * hierarchy , struct Selva_Subscription * sub ) { remove_sub_markers ( ctx , hierarchy , sub ) ; remove_sub_missing_accessor_markers ( hierarchy , sub ) ; RB_REMOVE ( hierarchy_subscriptions_tree , & hierarchy -> subs . head , sub ) ; SVector_Destroy ( & sub -> markers ) ; #if MEM_DEBUG memset ( sub , 0 , sizeof ( * sub ) ) ; #endif RedisModule_Free ( sub ) ; }
Destroy all markers owned by a subscription and destroy the subscription.
Destroy all markers owned by a subscription and destroy the subscription .
/* Destroy markers. */ /* Remove missing accessor markers. */