diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-30 23:13:38 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-01-02 19:45:47 -0500 |
commit | 6ee4f99042a289d0afecc11d322f0addd483c093 (patch) | |
tree | af84bf842f0c10fe13370ca8d8bdd10f1796ac5a /network | |
parent | ccd06097c79218f7d5ea4c21721bbcbc7c467dca (diff) |
bus: break reference cycle between bus and messages
Because messages in the read and write queues hold a reference on the
bus, and the bus holds a reference on each of them, we would never
free the bus if the read or write queues were not empty. Explicitly
substract the number of messages in those queue from the bus reference
count when deciding whether to free or not.
A simple test which creates and unrefs simple objects is added.
Diffstat (limited to 'network')
0 files changed, 0 insertions, 0 deletions