浏览代码

reset cl_descendants in macro context.
fixes potential memory leak

Aleksandr Kuzmenko 5 年之前
父节点
当前提交
45809b90c9
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/typing/macroContext.ml

+ 1 - 0
src/typing/macroContext.ml

@@ -440,6 +440,7 @@ and flush_macro_context mint ctx =
 			c.cl_restore <- (fun() ->
 				c.cl_meta <- meta;
 				c.cl_path <- path;
+				c.cl_descendants <- [];
 				Option.may (fun fn -> fn()) ctor_restore;
 				List.iter (fun fn -> fn()) field_restores;
 				List.iter (fun fn -> fn()) static_restores;