node: unlink ports before destroy

First unlink the ports, then destroy them. This is a more natural
way of cleaning up.
Make sure we destroy the node after destroying the ports.
Destroy the port after destroying its controls
Destroy resources after destroying the global
This commit is contained in:
Wim Taymans 2018-02-16 12:04:33 +01:00
parent 3db9a44679
commit 5034770eae
6 changed files with 74 additions and 47 deletions

View file

@ -487,6 +487,9 @@ void * pw_port_get_user_data(struct pw_port *port);
/** Add a port to a node \memberof pw_port */
int pw_port_add(struct pw_port *port, struct pw_node *node);
/** Unlink a port \memberof pw_port */
void pw_port_unlink(struct pw_port *port);
/** Destroy a port \memberof pw_port */
void pw_port_destroy(struct pw_port *port);