lua-users home
lua-l archive

[patch] fixed memory leak in etc/min.c

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,
the Lua interpreter should be closed after use. (Especially in the `examples' directory.)
Roland
$NetBSD$
--- etc/min.c.orig	2002年12月17日 15:19:48.000000000 +0100
+++ etc/min.c	2004年10月17日 09:20:23.000000000 +0200
@@ -42,5 +42,6 @@
 lua_register(L,"print",print);
 if (lua_load(L,getF,stdin,"=stdin") || lua_pcall(L,0,0,0))
 fprintf(stderr,"%s\n",lua_tostring(L,-1));
+ lua_close(L);
 return 0;
 }

AltStyle によって変換されたページ (->オリジナル) /