[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Conceptual problem with gettable tag method [repost]
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 13 Jun 2000 22:54:29 -0300 (EST)
>From: Falko Poiker <fpoiker@relic.com>
>Date: Mon, 12 Jun 2000 16:07:45 -0700
Thanks for the responses.
I was hoping to use lua's internal representation of Tables to get around
creating my own versions for vectors, but it seems like this is the only
way. I don't see myself needing to do a "foreach()" too often.
One problem I see right away, though with:
localvec = newVector(10, 10, 10)
localvec = GlobalVec
will result in a memory leak, because the vector created by newVector will
now have nothing pointing to it. I'm assuming the "gc" tagmethod wouldn't
take care of this situation. Even the setglobal tag method called to set
localvec wouldn't be able to dallocate the location initially pointed to by
localvec, because something else may be pointing to that location. Do I
have to keep a table of allocated vectors? Or did you find a better
solution when you implemented the image data type...
Thanks for all your help!
Falko