lua-users home
lua-l archive

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


On Mon, Jul 28, 2008 at 6:50 PM, Patrick Donnelly
<batrick.donnelly@gmail.com> wrote:
> 2) Make a table with some reference in the registry with weak keys and
> strong values. Associate each vector (key) to its matrix (value). When
> all the vectors are collected then the matrix itself will be
> collectible (I would prefer this tbh; it incurs little cost compared
> to environment tables).

I'd like to add that this does mean you will have to make a vector
userdata each time unless you do create some other association (in
that way, environment tables are probably better).

-- 
-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant