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_msg.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/upb_msg.h') diff --git a/src/upb_msg.h b/src/upb_msg.h index 4ca1e2a..42f9bb2 100644 --- a/src/upb_msg.h +++ b/src/upb_msg.h @@ -59,6 +59,7 @@ INLINE struct upb_msg *upb_msg_new(struct upb_msgdef *md) { memset(msg, 0, size); upb_mmhead_init(&msg->mmhead); msg->def = md; + upb_msgdef_ref(md); return msg; } -- cgit v1.2.3