lua-users home
lua-l archive

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


Quick question:

I have a piece of code that receive a userdata with a C pointer in it!.
My C function frees the pointer and I want to "delete" the variable that
was passed to my function -  What to do?

Erik Hougaard

p.s.

Example:

s = createsession("modem") <- 's' now has a pointer to a allocated
struct...
....
....
killsession(s)             <- I'm freeing the memory - How do I get rid
of s ?