es_copy_message(_:)
Copies a message, by allocating new memory.
Declaration
func es_copy_message(_ msg: UnsafePointer<es_message_t>) -> UnsafeMutablePointer<es_message_t>?Parameters
- msg:
The message to copy.
Return Value
A pointer to a copy of the original message.
Discussion
After calling this function, the caller owns this memory and must eventually free it with es_free_message(_:) to avoid leaking memory.