Let collectgarbage() behave as collectgarbage("collect")
This commit is contained in:
@@ -971,6 +971,7 @@ Files are no longer hosted at LuaForge.
|
||||
<li>Fix string backing ownership issue when compiling many scripts.</li>
|
||||
<li>Make LuaC compile state explicit and improve factoring.</li>
|
||||
<li>Add sample build.gradle file for Android example.</li>
|
||||
<li>collectgarbage() now behaves same as collectgarbage("collect") (fixes issue #41).</li>
|
||||
|
||||
</ul></td></tr>
|
||||
</table></td></tr></table>
|
||||
|
||||
@@ -134,7 +134,7 @@ public class BaseLib extends TwoArgFunction implements ResourceFinder {
|
||||
// "collectgarbage", // ( opt [,arg] ) -> value
|
||||
static final class collectgarbage extends VarArgFunction {
|
||||
public Varargs invoke(Varargs args) {
|
||||
String s = args.checkjstring(1);
|
||||
String s = args.optjstring(1, "collect");
|
||||
if ( "collect".equals(s) ) {
|
||||
System.gc();
|
||||
return ZERO;
|
||||
|
||||
Reference in New Issue
Block a user