What exactly is va_end for? Is it always necessary to call it?

前端 未结 3 1169
陌清茗
陌清茗 2020-12-08 04:10

va_end - Macro to reset arg_ptr.

After accessing a variable argument list, the arg_ptr pointer is

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 04:33

    In the common "parameters passed on the stack" implementation, I believe va_end() is usually nothing/empty/null. However, on platforms which have less traditional schemes, it becomes necessary. It's a "good practice" to include it to remain platform neutral.

提交回复
热议问题