[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Strangeness with the lua_State* parameter to luaM_realloc()
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 19 Nov 2002 08:48:50 +0000
> After using lua_open() to create a state, the accumulated memory totals
> are as follows: [...] But after freeing it with lua_close(), some of
> the blocks are released with NULL as the lua_State* parameter, instead
> of the pointer they were allocated with:
> Looking closer, the culprits are L->l_G, L->stack, and L->base_ci.
> What I'm wondering is if there's a reason that the deallocation of these
> structures doesn't want to be associated with a lua_State?
We will check that. Actually, anything that is allocated with a state
should be deallocated with the same state. It seems that only L
itself needs to be deallocated with NULL...