[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Redefining functions
- From: lua@...
- Date: Sat, 28 Sep 2002 22:43:30 +0200
> I think what you're shooting for is setting the gc threshold to 0. That
> should force a garbage collection cycle.
I did this and like magic the garbage collector kicks in and cleans
out the stale functions!
th = lua_getgcthreshold (L);
lua_setgcthreshold (L, 0);
lua_setgcthreshold (L, th);
Since the memory footprint was growing by at least 10 megabytes I
figured that the byte count was over the Threshold, but maybe
functions aren't counted in the byte count ? Anyway thanks for the
great help!! ( I'm using version 4.0.1 )