Re: Boxed userdata and garbage collector
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Boxed userdata and garbage collector
- From: Florian Weimer <fw@...>
- Date: 2010年9月02日 21:02:47 +0200
* Sylvain Fabre:
> If not, i would suggest to add (in lua 5.3 :) ? ) a way to allow the
> increase/decrease of the memory counter used in the garbage collector
> from the "external world" (either with a new lua_gc method or with a
> lua_newuserboxeddata).
> Any suggestion or ideas on this ?
Have you tried adding a function which frees the picture memory to
your API? That would mean that you could sustain a higher picture
allocation/deallocation rate independently of the garbage collector
implementation. For such large and comparatively rare objects, the
additional burden on the programmer does not seem that large.
Obviously, it depends a lot on your environment if this is feasible.