2
0
Эх сурвалжийг харах

reset cl_descendants in macro context.
fixes potential memory leak

Aleksandr Kuzmenko 5 жил өмнө
parent
commit
45809b90c9

+ 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;