[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Popping parameters (Was: String lifetime (C API))
- From: "Beric Holt" <beric@...>
- Date: Fri, 3 Mar 2006 09:43:23 +1300
Is this actually healthy? I must admit
that that in quite a few places I've been lazy and haven't popped off the
parameters at the end of a function, and I've often wondered if it is the cause
of an occasional random crash.
So is it true that lua will automatically pop off all
variables passed to a function when that function returns and clean up the
From: Chris [mailto:firstname.lastname@example.org]
Sent: Friday, 3 March 2006 3:30 a.m.
Subject: Re: String lifetime (C API)
Thanks, I finally
decided to just leave everything on the stack and assume it will get cleaned up
when the function returns.
Actually, I created a few proxy functions so
all I need to do is change those to whatever behaviour I want, just in case I
figure out another way or want to change it.