Name
netbuf_delete() — Deallocate a netbuf structure
Synopsis
void netbuf_delete
(
struct netbuf *)
;
Description
Deallocates a netbuf structure previously allocated by a call to the
netbuf_new()
function. Any buffer memory allocated to the netbuf by calls to
netbuf_alloc()
is also deallocated.
Example
Example 164.1. This example shows the basic mechanisms for using netbufs.
int main() { struct netbuf *buf; buf = netbuf_new(); /* create a new netbuf */ netbuf_alloc(buf, 100); /* allocate 100 bytes of buffer */ /* do something with the netbuf */ /* […] */ netbuf_delete(buf); /* deallocate netbuf */ }
2024-03-18 | LWIP Documentation Notices |