benjamin-bader / amanuensis

ah - MAN - you - EN - sis: Web Traffic Inspector
GNU General Public License v3.0
2 stars 0 forks source link

Replace shared_ptr to parent with weak_ptr #33

Closed benjamin-bader closed 6 years ago

benjamin-bader commented 6 years ago

The shared_ptr was the source of the memory leak, because the parent also holds a shared_ptr to the impl instance. Using a weak_ptr breaks the cycle, but makes notifying tx listeners more difficult. std::bind to the rescue!

Fixes #32.