函数
GLibmemdup
弃用:2.68
声明 [src]
gpointer
g_memdup (
gconstpointer mem,
guint byte_size
)
说明 [src]
分配 byte_size 字节的内存,并将 byte_size 字节从 mem 复制到其中。如果 mem 为 NULL,则返回 NULL。
弃用时间:2.68
使用 g_memdup2(),因为它接受 byte_size 的 gsize 参数,避免了在 gsize → guint 转换中溢出的可能性。