lua-users home
lua-l archive

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


On Mon, Nov 9, 2020 at 5:20 PM Ranier Vilela <> wrote:
> Em seg., 9 de nov. de 2020 às 13:04, Francisco Olarte <> 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.