From 6191fe3ae2fee99948da11d9834fe6425cf32037 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Thu, 26 Nov 2009 22:38:42 -0800 Subject: Reference-count upb_msgdef and upb_enumdef. The context owns a reference on each def, defs own references on defs they reference, and msgs own refs on their def. --- src/upb_mm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/upb_mm.c') diff --git a/src/upb_mm.c b/src/upb_mm.c index 212c2a2..cad1158 100644 --- a/src/upb_mm.c +++ b/src/upb_mm.c @@ -24,6 +24,7 @@ void upb_msg_destroy(struct upb_msg *msg) { if(!upb_msg_isset(msg, f) || !upb_field_ismm(f)) continue; upb_mm_destroy(upb_msg_getptr(msg, f), upb_field_ptrtype(f)); } + upb_msgdef_unref(msg->def); free(msg); } -- cgit v1.2.3