[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Lua table object methods, saving memory
- From: "Vincent Penquerc'h" <vincent@...>
- Date: Tue, 26 Sep 2000 18:07:38 +0100
> Above each object's getName() is holding a reference to the function
> FUNC. Only one instance of the function exists. This could potentially
> save you plenty of memory.
Another (dirty) thing that can be used is dropping code that won't be
used any more. For instance:
A={}
A:init=function
-- work
end
when you know init won't be used anymore (which is usually the case of an
init routine), you can A.init=nil. This requires knowledge of the possible
behaviors of the program, and will obviously be worth only if the init is
big in proportion of the total taken space...
--
Lyrian