lua-users home
lua-l archive

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


On Thu, Sep 2, 2010 at 1:27 PM, Ted Unangst <ted.unangst@gmail.com> wrote:
> What happens when you resize an image?  You need to allocate more
> memory.  You can't modify all the Lua references to the old image, so
> you need the Lua refs to be shallow pointers to the real data.  And
> allocating the real data as userdata too, and then hanging a reference
> to it, gets to be a pain.  You could make all operations return new
> images, but that's quite inefficient.

Hmm, see, since the OP said that they were using a "structure", I
assumed the userdatum was not the image itself but rather a structure
containing a pointer to an image.

If I was wrong I apologize.

~Jonathan