[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.4.2 (realloc ?)
- From: Francisco Olarte <folarte@...>
- Date: Mon, 9 Nov 2020 17:53:27 +0100
Rainier:
On Mon, Nov 9, 2020 at 5:20 PM Ranier Vilela <ranier.vf@gmail.com> wrote:
> Em seg., 9 de nov. de 2020 às 13:04, Francisco Olarte <folarte@peoplecall.com> escreveu:
...
>> single realloc and free ones ( you can do everything with realloc ).
> Including lost the original pointer, if realloc fail.
Only if you are not careful and do "return realloc(old, newsize)" or
something like that. You can equally easily lose the old pointer if
you try malloc or any other function and do not program it right. This
is C memory management 101.
Francisco Olarte.