title: Can I call bind() with a temp addr struct?
body: <p>The <code>bind()</code> function gets <code>const struct sockaddr *addr</code> as one of parameters. Can I pass a temp <code>sockaddr</code> structure, that will be deleted immediately after <code>bind()</code> calling?</p>
  
  <pre><code>void bindMe(int socket) {
      struct sockaddr_in addr = {...};
      bind(socket, (struct sockaddr_in*)&amp;addr, sizeof(sockaddr_in));
  }
  // addr is no more exist after function calling, 
  // but I still want to work with the socket.
  </code></pre>
  
  <p>Also, there is a lot of function in POSIX take pointer to structs. How can I determine if I can free the struct after function calling?</p>